

Ask HN: How do I prepare myself for a algorithms' exercise - sedeki

So I have a test coming up. It involves solving some problems that have time and space constraints. How can I prepare for this?
======
yen223
Practice on existing problems. Check out
[https://www.hackerrank.com/](https://www.hackerrank.com/) and
[https://code.google.com/codejam](https://code.google.com/codejam). I
particularly like Google Code Jam because they provide an analysis on how to
approach these kinds of algorithm exercises.

------
cpcarey
LeetCode has a great collection of problems that you can practice with and
test your solution in the browser
([https://oj.leetcode.com/](https://oj.leetcode.com/)). The discussion
sections were helpful as well.

GeeksforGeeks also has a collection of problems and analyses
([http://geeksforgeeks.org/fundamentals-of-
algorithms/](http://geeksforgeeks.org/fundamentals-of-algorithms/)).

So after refreshing yourself on the fundamentals, practice, practice,
practice. Hope this helps!

------
sian_OK
Practice, practice, practice will work 99% of the time. But it's worth
refining your approach to problem solving for when a question is thrown at you
and no answer immediately comes to mind. I can ping you some pointers - drop
me an email at: sian.roberson@oxfordknight.co.uk

Good luck with your test!

------
anigbrowl
Study similar problems, of course. Develop test problems that you would give
to an imaginary candidate, ie try to think of problems and constraints of your
own. Also, devise a test-taking algorithm to minimize the time loss of
unsolved questions.

------
implicit_none
This book was very useful to me: [http://www.amazon.com/Programming-
Interviews-Exposed-Secrets...](http://www.amazon.com/Programming-Interviews-
Exposed-Secrets-Landing/dp/1118261364)

------
lastofus
I've always found browsing through my old algorithms text books to refresh
myself helps a lot.

