1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ipn [44]
3 years ago
9

The quicksort is an example of a divide and conquer algorithm in that it divides the sorting problem into smaller problems by di

viding the list of items to be sorted into smaller subsets. The pivot is the mechanism that is used to segment the list. Describe how the quicksort works including a discussion of the pivot, how it is selected, and why the pivot is important to the quicksort.
Computers and Technology
1 answer:
ankoles [38]3 years ago
8 0

Answer:

The quicksort pivot is an arbitrary element within the collection that is being sorted.  Using the pivot point, the collection of elements is partitioned into two smaller lists of elements.  Using some logic, the smaller elements are placed left of the pivot point, and larger elements are placed to the right of the pivot point.  Ideally, you would prefer you pivot point to be a median of your dataset to optimize the creation of the two sublists into a balanced state.

Cheers.

You might be interested in
What do you mean by an algorithm?<br>​
Over [174]
A program that can be used in many scenarios
8 0
2 years ago
Machine code and Object code is the same right?​
guapka [62]

Answer:

"True" Machine code and Object code is the same.

Explanation:

All code at the same level is considered the same code, so we can say that the machine code, byte code, and the object code with it is of the same type, all of which are considered as the lowest level associated with the common program, these are common. Also known as source code because it is used in translating different languages.

6 0
3 years ago
How can I put my keyboard back​
zvonat [6]

Flip the laptop over, take off the screws that hold the frame together. Flip it back, take off the top plate. Then, slide the keyboard back in. Replace the frame, and then rescrew the screws. Replace the back side after.

~

8 0
3 years ago
Your teacher needs to keep track of a biology experiment's results for all students, to help calculate the grades. Which applica
IRISSAK [1]

Answer:

I think notepad is best suited for this task...

3 0
3 years ago
Read 2 more answers
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
stira [4]

Answer:

Here is the C program:

#include <stdio.h>  //to use input output functions

int main(void) {   //start of main function

 int arrowBaseHeight = 0;  //stores value for arrow base height

int  arrowBaseWidth = 0;  //stores value for arrow base width

 int arrowHeadWidth = 0 ;  //stores value for arrow head width

 int i, j;  //to traverse through the rows and columns

 printf("Enter arrow base height:\n");  //prompts user to enter arrow base height value

 scanf("%d", &arrowBaseHeight);  //reads input value of arrow base height

 printf("Enter arrow base width:\n");  //prompts user to enter arrow base width value

 scanf("%d", &arrowBaseWidth);  //reads input value of arrow base width

 while (arrowHeadWidth <= arrowBaseWidth)  {   //iterates as long as the value of arrowHeadWidth is less than or equals to the value of arrowBaseWidth  

     printf("Enter arrow head width:\n");   //prompts user to enter arrow head width value

     scanf("%d", &arrowHeadWidth);   //reads input value of arrow head width

     printf("\n"); }

 for (i = 0; i < arrowBaseHeight; i++)    {   //iterates through rows

     for (j = 0; j < arrowBaseWidth; j++)  {   //iterates through columns

         printf("*");       }   //prints asterisks

     printf("\n");   }   //prints a new line

 for (i = arrowHeadWidth; i > 0; i--)    {   //loop for input length

     for (j = i; j > 0; j--)        {   //iterates for triangle ( to make arrow head)

         printf("*");       }   //prints asterisks

     printf("\n");   }  } //prints new line

Explanation:

The program asks to enter the height of the arrow base, width of the arrow base and the width of arrow head. When asking to enter the width of the arrow head, a condition is checked that the arrow head width arrowHeadWidth should be less than or equal to width of arrow base arrowBaseWidth. The while loop keeps iterating until the user enters the arrow head width larger than the value of arrow base width.  

The loop is used to output an arrow base of height arrowBaseHeight.

The nested loop is being used which as a whole outputs an arrow base of width arrowBaseWidth. The inner loop draws the stars and forms the base width of the arrow, and the outer loop iterates a number of times equal to the height of the arrow.

The last nested loop is used to output an arrow head of width arrowHeadWidth. The inner loop forms the arrow head and prints the stars needed to form an arrow head.  

The screenshot of output is attached.

8 0
2 years ago
Other questions:
  • In Python Calculate the BMI of a person using the formula BMI = ( Weight in Pounds / ( ( Height in inches ) x ( Height in inches
    9·1 answer
  • Which of the following definitions describes a chemical hazard?
    8·2 answers
  • Which of the following is an example of a federal tax? A. Social Security tax B. Sales tax C. Property tax D. Transaction tax
    8·1 answer
  • Which of the following is the correct ordering of operating systems, oldest to newest?
    5·2 answers
  • For this lab you will do 2 things:
    14·1 answer
  • A company currently uses Microsoft Active Directory as its identity provider. The company recently purchased Oracle Cloud Infras
    13·1 answer
  • People often want to save money for a future purchase. You are writing a program to determine how much to save each week given t
    11·2 answers
  • Pa answer po thank you​
    7·2 answers
  • The economic importance of computer viruses​
    14·2 answers
  • Any idea how to make my simple python projects such as guess the number, mad libs, etc. even better?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!