<p>The Sedgwick resource is excellent. Besides online chapter summaries and code examples, it has a corresponding Coursera class with videos and grades exercises.</p>

CC BY-SA 4.0
2019-11-30T01:07:56.823Z
2019-11-30T01:07:56.823Z
Brendenw
<p>Based on clarification in comments, <a href="https://algs4.cs.princeton.edu/code/" rel="nofollow noreferrer"><em>Algorithms</em> 4th ed. by Sedgewick and Wayne</a> seems to meet your criteria. The book itself doesn't seem to have an official PDF version (I haven't searched for unofficial ones of dubious provenance), but the code is available both at the linked page and <a href="https://github.com/kevin-wayne/algs4" rel="nofollow noreferrer">on Github</a>, and includes solutions to selected exercises.</p>

CC BY-SA 4.0
2019-10-15T22:29:30.067Z
That's a great resource! It would be perfect if we could find also solved problems in the style of Jeff Erickson's Algorithms textbook.
Drimades Boy
CC BY-SA 4.0
2019-10-15T17:38:12.447Z
2019-10-15T17:38:12.447Z
Peter Taylor
<p>There are a number of sites with challenges- once you complete a challenge you can often view other solutions, and many of these sites (not all) support multiple languages.</p>

<ol>
<li><a href="https://codingbat.com/" rel="nofollow noreferrer">CodingBat</a></li>
<li><a href="https://www.hackerrank.com/" rel="nofollow noreferrer">HackerRank</a> </li>
<li><a href="http://rosalind.info/problems/locations/" rel="nofollow noreferrer">Rosalind</a></li>
<li><a href="http://www.pythonchallenge.com/" rel="nofollow noreferrer">The Python Challenge</a> </li>
<li><a href="https://www.topcoder.com/challenges" rel="nofollow noreferrer">TopCoder</a></li>
<li><a href="https://projecteuler.net/" rel="nofollow noreferrer">Project Euler</a> </li>
<li><a href="https://www.codechef.com/" rel="nofollow noreferrer">Coding Chef</a></li>
</ol>

<p>Even the "Python Challenge" tasks can be solved with another language since all you are looking for each time is the next url.  A scan of each site will give you a good idea if the problem sets are useful, or if they spark ideas for your own challenges.</p>

<p>Worth a look I think.</p>

CC BY-SA 4.0
2019-11-02T18:52:34.700Z
2019-11-02T18:52:34.700Z
srattigan
<p>I'm trying to find an online source or textbook with problems+solutions for problems in dynamic programming, number theory, graph theory, greedy algorithms, etc. Do you know of any?</p>

CC BY-SA 4.0
2019-10-10T20:38:21.967Z
Google is your friend.
Buffy
CC BY-SA 4.0
2019-10-11T15:17:24.260Z
Google has been not friendly lately, but I will try again. Thanks!
Drimades Boy
CC BY-SA 4.0
2019-10-11T16:51:27.373Z
It's been noted before that most resources are not organized this way. I'm not sure why even one online resource is hard to find, but that does seem to be the case.
Ben I.
CC BY-SA 4.0
2019-10-11T23:31:44.763Z
Jeff Erickson's page (U of Illinois) is a good source with plenty of materials, but the provided solutions are quite fragmented.
Drimades Boy
CC BY-SA 4.0
2019-10-15T08:26:12.443Z
Could you clarify *online*? Would a paper textbook whose code is available online meet your needs?
Peter Taylor
CC BY-SA 4.0
2019-10-15T17:07:20.930Z
@PeterTaylor sure! I have access to the library and I can easily get a hard copy.
Drimades Boy
<programming><algorithms>
Any website/textbook with problems+solutions in algorithms?
# Any website/textbook with problems+solutions in algorithms?

(Asked by: username_0 on 2019-10-10)

I'm trying to find an online source or textbook with problems+solutions for problems in dynamic programming, number theory, graph theory, greedy algorithms, etc. Do you know of any?

**Tags:** programming, algorithms

> **Comments:**
> **username_1**: Google is your friend.  
> **username_0**: Google has been not friendly lately, but I will try again. Thanks!  
> **username_2**: It's been noted before that most resources are not organized this way. I'm not sure why even one online resource is hard to find, but that does seem to be the case.  
> **username_0**: Jeff Erickson's page (U of Illinois) is a good source with plenty of materials, but the provided solutions are quite fragmented.  
> **username_3**: Could you clarify *online*? Would a paper textbook whose code is available online meet your needs?  
> **username_0**: @PeterTaylor sure! I have access to the library and I can easily get a hard copy.  

---

## 3 answers

### Answer by username_3 on 2019-10-15. Score: 4

Based on clarification in comments, [*Algorithms* 4th ed. by Sedgewick and Wayne](https://algs4.cs.princeton.edu/code/) seems to meet your criteria. The book itself doesn't seem to have an official PDF version (I haven't searched for unofficial ones of dubious provenance), but the code is available both at the linked page and [on Github](https://github.com/kevin-wayne/algs4), and includes solutions to selected exercises.

> **Comments:**
> **username_0**: That's a great resource! It would be perfect if we could find also solved problems in the style of Jeff Erickson's Algorithms textbook.  

---

### Answer by username_5 on 2019-11-02. Score: 4

There are a number of sites with challenges- once you complete a challenge you can often view other solutions, and many of these sites (not all) support multiple languages.

1. [CodingBat](https://codingbat.com/)
2. [HackerRank](https://www.hackerrank.com/)
3. [Rosalind](http://rosalind.info/problems/locations/)
4. [The Python Challenge](http://www.pythonchallenge.com/)
5. [TopCoder](https://www.topcoder.com/challenges)
6. [Project Euler](https://projecteuler.net/)
7. [Coding Chef](https://www.codechef.com/)

Even the "Python Challenge" tasks can be solved with another language since all you are looking for each time is the next url. A scan of each site will give you a good idea if the problem sets are useful, or if they spark ideas for your own challenges.

Worth a look I think.


---

### Answer by username_4 on 2019-11-30. Score: 2

The Sedgwick resource is excellent. Besides online chapter summaries and code examples, it has a corresponding Coursera class with videos and grades exercises.


---

