r/programming • u/svpino • 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
1
u/[deleted] May 08 '15
No, this works, good job! This is the only correct solution to this problem posted so far that isn't just brute forcing it. You could speed it up and make it simpler by implementing string comparison like this:
Then you just sort using this and concatenate all the strings. Everything simpler than this will fail.