Arranging boxes in chronological order along the floor. While it’s easy for you to walk around and read a date on the o
Posted: Thu May 05, 2022 1:18 pm
Arranging boxes in chronological order along the floor.
While it’s easy for you to walk around and read a date on the
outside of any heavy box, you’d like to actually move as few boxes
as possible. The office is nearly full: there is only enough extra
space to hold any one of the file boxes, but not two. You can’t
stack the boxes and you can’t move more than one at a time, and you
of course cannot magically duplicate the boxes. Which sorting
algorithm should you use?
Selection sort
Insertion sort
Mergesort
Quicksort
While it’s easy for you to walk around and read a date on the
outside of any heavy box, you’d like to actually move as few boxes
as possible. The office is nearly full: there is only enough extra
space to hold any one of the file boxes, but not two. You can’t
stack the boxes and you can’t move more than one at a time, and you
of course cannot magically duplicate the boxes. Which sorting
algorithm should you use?
Selection sort
Insertion sort
Mergesort
Quicksort