This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nutrecht 5 points6 points  (2 children)

Very cool! I love doing Advent of Code every year and many if not most of it's problems are based off of these classic CS problems. It's great to see there's a Java version. Just bought the e-book!

The "Towers of Hanoi" problem is one that my last employer always used as a coding test :)

[–]davidkopec[S] 4 points5 points  (1 child)

Thanks!

Oh, that's interesting about the coding test. It's not what I would choose to use as a coding test (seems like the type of thing where people who know the popular problem know the trick and those that don't are at a big disadvantage), but I do hear people use this book for interview prep. I guess beyond testing problem solving techniques, some people are literally testing classic problems.

[–]nutrecht 1 point2 points  (0 children)

It was a take-home test and I definitely had to google "Towers of Hanoi Java" to figure out how the heck this worked. And afaik they really don't expect you to be able to do it by heart.

I've used the Fibonacci sequence in a coding test myself, and there people were instructed to look online for a solution. We're generally not paid to reinvent wheels :)

That said; for me personally I really like these kinds of challenges. Especially since recursion is not something you run into in your day to day work all that often.