3 ms·
You should check out sites like TopCoder [0] or UVa's online judge [1]. These sites offer tons of problems that focus more on algorithms and data structures, ra
by stack_underflow 14y ago
You should check out sites like TopCoder [0] or UVa's online judge [1]. These sites offer tons of problems that focus more on algorithms and data structures, rather than just number theory and math-based problems like Project Euler - which I find becomes repetitive really fast. These judge sites will have problems ranging in topics such as ad hoc, searching, sorting, greedy, graph theory, geometry, dynamic programming, etc.
If you want to get started, try going through TopCoder's high school competition arena. The problems shouldn't be too bad if you have a good understanding of your languages stdlib and about basic data structures (alternatively, it's probably a great way to learn a new language's stdlib). You basically get a problem statement and just have to fill in a method that performs the computations required with the example inputs. Then you can test it against all the test cases once it passes the example outputs. UVa is similar, except you have to take input from a file and it doesn't tell you what test cases your solution fails on (more like the ACM ICPC style of questions).
I prefer TopCoder more since the focus is all on algorithms (UVa's problems will usually require taking input/producing output in very specific ways, which gets annoying sometimes), and since you can see the top ranked competitors' solutions for previous contents. It helps to review these after you solve a problem to pick up little tricks.
[0] (http://www.topcoder.com/tc http://www.topcoder.com/tc) - click the O(n) icon in the top left to start the arena applet. Then go to "Practice Rooms" -> "TCHS" or "SRM" and pick a room. Within each room there should be 3 problems valued based on difficulty.
[1] (http://uva.onlinejudge.org/ http://uva.onlinejudge.org/) - go to "Browse Problems" to view them all, but I find http://uhunt.felix-halim.net/ http://uhunt.felix-halim.net/ more useful; just enter your username and it'll suggest problems for you to do next (based on increasing difficulty)