| | |
quick sort question
![]() |
•
•
Join Date: Oct 2005
Posts: 38
Reputation:
Solved Threads: 0
Below is my assignment. If I understand this correctly pivot as a median is the middle of the highest, middle, and lowest numbers. In this case 35 (14, 35, 72). Please correct me if I am wrong. I do not understand how to do part b. Could someone please explain this as well? Thank you in advance.
assume the following list of keys
18, 40, 16, 82, 64, 67, 57, 50, 37, 47, 72, 14, 17, 27, 35
This list is to be sorted using the quick sort algorithm. Use pivot as the median of the first, last and middle elements of the list.
a. what is pivot?
b. give the resulting list after one call to the partition procedure.
assume the following list of keys
18, 40, 16, 82, 64, 67, 57, 50, 37, 47, 72, 14, 17, 27, 35
This list is to be sorted using the quick sort algorithm. Use pivot as the median of the first, last and middle elements of the list.
a. what is pivot?
b. give the resulting list after one call to the partition procedure.
![]() |
Similar Threads
- quick Sort (C)
- Code for Quick Sort (using Recursion) (Assembly)
- Quick Sort Program (C)
- Can you guys help me? about Quick Sort Algorithm (C)
Other Threads in the C Forum
- Previous Thread: syntax error
- Next Thread: Class Functions and Conversions
| Thread Tools | Search this Thread |
#include * adobe ansi array asterisks binarysearch centimeter changingto char character cm convert copyimagefile cprogramme creafecopyofanytypeoffileinc database dynamic execv feet fgets file floatingpointvalidation fork function getlogicaldrivestrin givemetehcodez global grade gtkwinlinux hacking histogram ide inches include incrementoperators infiniteloop input interest intmain() iso kernel keyboard kilometer license linked linkedlist linux list locate looping lowest match matrix meter microsoft number oddnumber opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc process program programming radix recursion recv recvblocked research reversing segmentationfault sequential single socket socketprograming socketprogramming standard strchr string suggestions systemcall test threads turboc unix urboc user variable voidmain() wab whythiscodecausesegmentationfault windowsapi






