Who can explain frogsort algorithm / SMBC (saturday morning breakfast cereal) :: prehistoric :: college :: comics (funny comics & strips, cartoons)

comics SMBC college prehistoric 
4/e.fc.v Crooo.uiee.-,comics,funny comics & strips, cartoons,SMBC,saturday morning breakfast cereal,college,prehistoric
Details Who can explain frogsort algorithm
4/e.fc.v Crooo. uiee.-
comics,funny comics & strips, cartoons,SMBC,saturday morning breakfast cereal,college,prehistoric
More
Expand
Comments 221.12.201211:11link2.1
I don't know which sort it's modeling, but it looks like an out-of-place sort.

In terms of how it works, a frog (counter) is added to all of the boxes (indices) at once. Each of them are incremented simultaneously, and then checked against the value stored in that index (it takes longer for a frog to eat 5 flies than 4 flies). When a counter's value is equivalent to the key value of the item in that index, it is appended to the list, so that you end up with a list in ascending order.
Daniel Li Daniel Li21.12.201214:30responselink 0.0
Sounds more like a "sleep sort" to me - a semi-joke algorithm where you tell a thread to sleep for n seconds, then print n. Though instead of multithreading, you get multifrogging.
undecisive undecisive07.02.201418:17responselink 0.3
Только зарегистрированные и активированные пользователи могут добавлять комментарии.
Related tags

Similar posts