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

1

u/thirdegree May 08 '15 edited May 08 '15

Pretty much. My solution was

def test(li):
    return int("".join(i for i in reversed(sorted(map(str, li)))))

which is probably a good deal more elaborate than it needs to be.

Edit: this doesn't work, it fails on the [9295, 92, 7] that another poster suggested.

1

u/Tysonzero May 08 '15

It also fails on [9, 91]