Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just a few days ago I discovered Codility, and I tried their challenges. And I must say. I got my behind handed to me on a platter. I'm not sure what the problem was, but I'll lick my wounds and wait for the solution to come out and compare it with my own. In the meantime, I want to get ready for the next challenge so I'm reading their previous blog posts and seeing how to solve their previous problems. There are a lot of new things I haven't heard about like (Cartesian trees, various sort algorithms, etc.)

So, how does one prepare for such challenges (especially the O(x) time and space complexity). What should I read to prepare for such a task?

share|improve this question

closed as off-topic by Martijn Pieters, amon, Matthieu, haylem, BЈовић Feb 26 '14 at 16:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking career or education advice are off topic on Programmers. They are only meaningful to the asker and do not generate lasting value for the broader programming community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – Martijn Pieters, amon, Matthieu, haylem, BЈовић
If this question can be reworded to fit the rules in the help center, please edit the question.

I've been studying haskell lately partly to force my brain to contort (it will force this) specifically to help become more nimble in thinking up solutions. That said, I'm also reading The Algorithm Design Manual (free online pdf exists) and a garage sale copy of The Art of Computer Programming Vol 1 Fundamental Algorithms by Knuth (which is also a serious source of brain pain) for the same purpose. – Jimmy Hoffa Oct 5 '12 at 15:11
up vote 3 down vote accepted

how does one prepare for such challenges (especially the O(x) time and space complexity). What should I read to prepare for such a task?

By getting prepared of course ! It is a matter of practice and getting up to speed about areas that you have felt short. Thanks God, pretty good resources to cover once information shortcomings are on the internet and Google is your friend.

Regarding references i would advice several web-sited that do have programmer challenge questions. From that question types you can determine your shortcomings and study for them.

Resources to look:

share|improve this answer

The only thing that you can do to prepare yourself for such kind of tests is practice. Practice a lot. There are a lot of good resouces for coders help, such as topcoder, codegolf, geeks for geeks, Programming Praxies, CodeKata, Project Euler etc.

If you are having problems with data structures, it would be better that you brush up your algorithm and data structure concepts. Best Place for that is wikipedia, but you can also look for algo data courses on nptel, coursera, etc...

share|improve this answer
I was looking more for resources like books, but some of your links have been new and informative. – Daniel Fath Oct 5 '12 at 8:34
@DanielFath: Reading about it helps, but problem solving is an art that has to be practiced if you want to become good at it. In the world of writing software, there is a surprisingly large number of of problems you'll see repeatedly. The experience of having solved them before gives you the ability to spot new variations and quickly apply a good solution. – Blrfl Oct 5 '12 at 12:04
I agree with practice a lot part, I'm merely expressing desire for more concrete resources, in order to consider the question solved. I upvoted the answers (heck I've upvoted all of them). – Daniel Fath Oct 5 '12 at 13:42

The semi-official blog posts about Google recruitement recommands this book: The Algorithm Design Manual.

It's very comprehensive and well written, with a 'quick reference' part that can help a lot in your situation, once you're familiar enough with common algorithms and data structures.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.