r/programming • • May 08 '15

Five programming problems every Software Engineer should be able to solve in less than 1 hour

https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
2.5k Upvotes

2.1k comments sorted by

View all comments

Show parent comments

2

u/rabbitlion May 08 '15

That doesn't get anywhere near a correct answer. If you have for example 2, 2, 21 all three gets placed in the same sublist and when they are sorted you will get 2122 which is clearly smaller than 2221.

1

u/Inondle May 08 '15

Yeah I guess it would have been more effective to do a traditional radix sort. I kinda overlooked those cases.