?

Log in

No account? Create an account

Previous Entry | Next Entry

Office sort

This is mostly for the CS types:

Say you're in an office, and someone brings in a stack of 500 papers that needs to be sorted. How do you think they'll naturally approach the problem, and how as someone brimming with CS knowledge would you advise them to sort it?

See the comment count unavailable DW comments at http://mindstalk.dreamwidth.org/311734.html#comments

Tags:

Comments

mindstalk
Mar. 13th, 2012 01:57 pm (UTC)
I'd expect insertion sort, and I'd let them do it. A stack of papers allows enough random access for binary search *and* constant time insertion, making it n*log(n) and probably better than quick or heap sort, especially heap which requires more precise random access than you'd actually have.

Selection and bubble sort don't seem to get the same benefit from physicality.

Of course if it's a very large stack, or if there's multiple people available, some amount of split and merge would be appropriate.

Profile

Phoenix
mindstalk
Damien Sullivan
Website

Latest Month

June 2019
S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Tags

Page Summary

Powered by LiveJournal.com
Designed by Lilia Ahner