I am not obsessive!

Let's say you have spent an unhealthy portion of your life collecting and linearly sorting an incredulous amount of plastic birds ( 1 0 6 \geq 10^6 ) by color in your room. All of your birds are unique (you have of-course verified this by precisely computing each bird's R G B \color{#20A900}{\text{R}} \color{#D61F06}{\text{G}} \color{#3D99F6}{\text{B}} value.)

You have all birds in order. One day, your nefarious little brother, sneaks into your room, taking one bird and putting it in a wrong position. Which of the following sorting schemes is your best bet at efficiently sorting your precious plastic bird collection?

Radix Sort Heap Sort Insertion Sort Merge Sort

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Mohammad Farhat
Aug 30, 2018

There is only 1 bird that is moved (thanks to your brother), so using Merge sort would unnecessarily complicate thing so Merge sort is not that ideal. Radix sort and Heap sort would do the same. Tackling with only portions is better and so Insertion sort is ideal.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...