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

86

u/flat5 May 08 '15

Less than an hour for all 5, or less than an hour each?

I can do both 4 and 5 but they might take a little time to make sure I've gotten them right.

The first 3 are quite easy and should be doable in a few minutes.

29

u/B8foPIlIlllvvvvvv May 08 '15

Less than an hour for all 5.

34

u/Oberheimz May 08 '15

an hour for all 5.

It took me 42 minutes to solve the first 4 problems and I was unable to finish the fifth within one hour.. Unless there's a really simple trick on the fifth one which I can't see it takes a while write all the code.

2

u/matthieum May 08 '15

The 5th one should be brute-forced (your method of choice) because it only has 38 possibilities anyway (3**8 = 9**4 < 10,000).

There may be a trick, but if you look carefully at the other 4 problems they are not trick questions or algorithm questions; all 5 can be brute-forced quickly enough on a modern computer.

→ More replies (1)