top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

what is the difference between quick sort and binary sort ??

+5 votes
4,817 views
what is the difference between quick sort and binary sort ??
posted Oct 1, 2013 by Vikas Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Is it binary search or binary sort ? or Are you considering merge sort as binary sort since it works on the concept of divide(by half) and conquer.
I think he is asking for the binary search tree way of sorting, not sure...

1 Answer

+3 votes

A binary sort is a very fast algorithm which involves bit testing. It has a single pass for each bit in the sortable item. For each pass, if the bit is set then the sortable item is stacked at one end of the buffer. If the bit is not set then the item is stacked at the other end of the buffer. Starting the sort at the least significant bit and dealing with the next bits in ascending order will result in the sorted list.

Quick sort has two phases:-
1.The partition phase
2. sort phase.

In quicksort, we divide the array of items to be sorted into two partitions and then call the quicksort procedure recursively to sort the two partitions, ie we divide the problem into two smaller ones and
conquer by solving the smaller ones. the partition phase must ensure that the pivot is greater than all
the items in one part (the lower part) and less than all those in the other (upper) part.

To do this, we choose a pivot element and arrange that all the items in the lower part are less than the
pivot and all those in the upper part greater than it. In the most general case, we don't know anything
about the items to be sorted, so that any choice of the pivot element will do the first element is a
convenient one.Items less than the pivot are placed to the left of the new array and items greater than
the pivot are placed on the right. In the final step, the pivot is dropped into the remaining slot in the middle.

answer Oct 1, 2013 by Arvind Singh
Can you please provide an example of binary sort?
...