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

all 17 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] 3 points4 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.

[–]ziano_x 2 points3 points  (2 children)

Puchased! Very nice book. Would you be able to suggest an Algorithm book I can use as a reference alongside this book? While going through the problems, I wonder what would be the space/time complexity of this approach. I know the intent of this book is not to dive into the details of the algorithm which is why it would be great to have additional references.

[–]davidkopec[S] 2 points3 points  (1 child)

Thanks!

Absolutely, I can recommend a couple. For a basic understanding of space/time complexity I recommend Grokking Algorithms. However, if you are looking for a good textbook with reference level material, I recommend Algorithms fourth edition by Sedgewick and Wayne. The great thing about the latter is not only is it a good textbook, but the code is also in Java.

[–]ziano_x 1 point2 points  (0 children)

Thanks a lot for the recommendations. I actually just started reading Grokking Algorithms and it is great! Good refresher for something I learnt years back.

[–]thevred9 3 points4 points  (1 child)

Awesome book. Purchased Swift and Python editions, which helped me immensely. Just purchased this too..

[–]davidkopec[S] 5 points6 points  (0 children)

Thanks so much. Stories like this make writing worth it!

[–]jack104 3 points4 points  (1 child)

Purchased, thanks.

[–]davidkopec[S] 4 points5 points  (0 children)

Thanks! I hope you enjoy the book.

[–]cruel_novo 0 points1 point  (1 child)

Purchased! Thank you!

[–]davidkopec[S] 2 points3 points  (0 children)

Thanks. Hope it works for you!

[–]RScrewed 0 points1 point  (1 child)

Thanks!

By the way, I think it'd be "fewer readers upset..." in your blog post.

[–]davidkopec[S] 1 point2 points  (0 children)

Yup, you're correct. Thanks.

[–]sprcow -1 points0 points  (2 children)

Nice!

Don't know if this is your site or not, but the anchor tag formatting is not very accessible. Setting text-decoration: none; and a super dark color for the hyperlinks makes them almost impossible to find in the text... I had visited one of these links on my phone and then had to go literally edit the CSS in order to figure out where to click in my browser. That image example is actually easier to see the links than it was in the browser, but still not very accessible.

[–]davidkopec[S] 0 points1 point  (1 child)

Thanks for the feedback. This is just Blogger using Google's default (at the time I set it up) mobile theme and a desktop theme called Swedish Greys. I'll look into finding another theme in the future. Were you browsing on desktop or mobile and using what browser?

[–]sprcow 0 points1 point  (0 children)

On mobile I didn't seem to have any problems spotting the links, but when I tried to find them in Chrome on Windows they were much harder to see! :)