News for hackers. Stuff that matters.

Ask HN: Where to find programming challenges for sharpening algorithmic skills?

I am looking for a set of programming challenges that'll help sharpen my algorithmic skills.

I've worked a bit with CodeChef and SPOJ. Both have problems that test problem solving abilities of varied nature.

However, I am unable to decide which one to follow through with. So I decided to ask the community.

What resources would you suggest for improving my thinking/algorithmic skills? Something, that'll have problems spanning all the fundamental concepts.

I am a student of Computer Science Engineering, and I'm not new to programming or algorithms; though I'm a far cry from being an expert.

I had tried my hand at Project Euler too, but you can get through those problems with sub-optimal solutions. For eg. the first problem's solution can be arrived by at by using an O(1) algorithm, but the system would accept a solution generated using an O(n) algorithm too. That wouldn't motivate deep thinking. (http://projecteuler.net/problem=1)

( 12 comments | 20 points | on HN )
Re:Ask HN: Where to find programming challenges for sharpeni... by tim_hutton on Wednesday August 14, 2013 @06:26AM (#6210720)
Keep going with Project Euler. It's not long before the brute force approach stops working. On later problems you will find many ways to solve them but very few that return an answer in less than a week, say.
Re:Ask HN: Where to find programming challenges for sharpeni... by bjourne on Wednesday August 14, 2013 @07:03AM (#6210808)
Add solutions to problems at http://rosettacode.org. Even if your solution is suboptimal, someone is likely to come along and improve it. Or create a totally new problem and solve it in your language of choice.
Re:Ask HN: Where to find programming challenges for sharpeni... by WizzleKake on Wednesday August 14, 2013 @06:39PM (#6214837)
I can recommend Rosalind http://rosalind.info/problems/locations/

It has bioinformatics problems. They start really easy ("count the bases in a DNA sequence") and get progressively harder.

For each problem you get some sample data to work with. When you think you've figured it out, you can download a dataset to run your algorithm against, then upload the output to see if you are correct. There's a time limit for submission, and although you can keep re-trying, the data sets are different each time.

Check it out! Don't let the bioinformatics part throw you off.

Re:Ask HN: Where to find programming challenges for sharpeni... by tujv on Wednesday August 14, 2013 @06:16AM (#6210699)
I highly recommend the book "Programming Challenges" by Steven Skiena, used in conjunction with UVA Online Judge at http://onlinejudge.org.

Each challenge takes the form of a word problem. The solution can be coded in a few different languages and uploaded to the website.

The site imposes time limits when running the solution. When I've found that my solution works but is too slow, it has encouraged me to look for different data structures or algorithms.

I can't recommend it enough.

Re:Ask HN: Where to find programming challenges for sharpeni... by pocha on Wednesday August 14, 2013 @05:48AM (#6210636)
Have you tried www.hackerrank.com ? I have not personally used it. Also, I am not a big fan of algorithmic problems either.
Re:Ask HN: Where to find programming challenges for sharpeni... by Fa773NM0nK on Wednesday August 14, 2013 @06:04AM (#6210670)
I've not tried hackerrank.

Will surely give it a whirl.

Re:Ask HN: Where to find programming challenges for sharpeni... by S4M on Wednesday August 14, 2013 @10:07AM (#6211549)
Someone on HN posted the Martyr2's mega project list: https://github.com/thekarangoel/Projects

You could take some inspiration from it.

Re:Ask HN: Where to find programming challenges for sharpeni... by linux_devil on Wednesday August 14, 2013 @06:11AM (#6210684)
Both codechef and SPOJ are good enough , focusing on one will be a good strategy. You may give a try to interviewstreet as well. But like I said mastering problems on any one of the sites is sufficient .
Re:Ask HN: Where to find programming challenges for sharpeni... by dagw on Wednesday August 14, 2013 @06:29AM (#6210728)
You can only brute force the first handful of Project Euler problems. You quickly hit problems where the difference between the right and wrong approach is seconds vs hours or days.
Re:Ask HN: Where to find programming challenges for sharpeni... by yulaow on Wednesday August 21, 2013 @03:47PM (#6252878)
Re:Ask HN: Where to find programming challenges for sharpeni... by brudgers on Wednesday August 14, 2013 @07:49AM (#6210960)
The Art of Computer Programming, Knuth.
Re:Ask HN: Where to find programming challenges for sharpeni... by vishalzone2002 on Wednesday August 14, 2013 @09:42AM (#6211410)
topcoder.com