views:

161

answers:

6

I want to improve my programming skills for a future job interview (and for myself) and I am looking for some book or text that has only problems and solutions (in some general language like C or in pseudo code) that illustrate basic algorithms and data structures.

Problems that I expect to find are for example:

  • find sub string in a string
  • reverse a linked list
  • count words in a file
  • etc ...

The book should be as short as possible and problems should be as creative and interesting as possible.

+10  A: 

How about the ever cited Project Euler? It's more about more complex problems than basic building-block algorithms.

Solutions are discussed in the forums.

Mau
+1  A: 

My favorite book is "Programming interviews exposed".

+7  A: 

Programming Pearls and/or Programming Challenges might float your boat. They're perhaps a little less biased towards mathematical-type program-lets than Project Euler.

High Performance Mark
I would upvote for either mentioning Programming Pearls or Programming Challenges, and I would definitely upvote for being direct regarding Project Euler problems. Alas, just a single +1 by me.
Dimitris Andreou
@Dimitris: yes, I can't recall ever having to solve a Project Euler problem in the workplace.
High Performance Mark
I will look at this, looks nice!
Matthew Murdock
+3  A: 

Not a book (but note that Programming Challenges book derive its problems from there) but probably the best online problem collection:

UVa Online Judge

Other similar sites:

http://acmicpc-live-archive.uva.es/nuevoportal/

http://acm.timus.ru/problemset.aspx

The following contains many hints regarding problems and techniques:

http://www.comp.nus.edu.sg/~stevenha/programming/acmoj.html

Also, google's very own...

http://code.google.com/codejam/contests.html

(...which also gives access to other people's solutions).

Dimitris Andreou
A: 

Here is one more link, I found it very useful.

http://bit.ly/diFyZL

A: 

I don't know the nature of your job interview. Since you mentioned C, please let me strongly recommend you the classic The C Programming Language by Kernighan and Ritchie. It is not only a classic to learn the C language, but it is also full of interesting exercises similar to what you have mentioned, and it's relatively short (with 270 pages, it's about half the typical programming book).

With this book, you not only get a solid foundation for C, but also for many other languages derived from it. Indeed, some recommend learning C before trying to learn C++, Java, C#, JavaScript, PHP, and other languages.

To put the cherry on the top, it is so well written, that it's a pleasure to read and learn from it, and the exercises are useful and fun. My favorite programming computer book ever.

Good luck!

Luis

luiscolorado
It's a great book, I would give it +100, but I wanted something like list of problems, not a programming book.
Matthew Murdock