Answers.Body: <p>The book by Jeff Erickson, <a href="http://jeffe.cs.illinois.edu/teaching/algorithms/" rel="nofollow noreferrer">&quot;Algorithms&quot;</a> is a (tough!) next step after getting confortable with the basics.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-18T20:31:05.600Z
Answers.Text: Thanks, will check it out.
Answers.UserDisplayName: Helix
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-22T01:46:49.323Z
Answers.LastActivityDate: 2021-04-22T01:46:49.323Z
Answers.UserDisplayName: vonbrand
Answers.Body: <p>Not exactly exercises, but you learn a lot about programming by working through books like Kernighan and Pike's &quot;The practice of programming&quot; (Addison-Wesley, 1999) and Bentley's &quot;Programming Pearls&quot; (Addison Wesley, 2nd edition 1999). They are <em>not</em> books on any language's syntax, they show how to solve though problems elegantly.</p>
  <p>Be advised that those scoundrels have a knack of making hard problems seem almost trivial, with solutions of a couple dozen lines.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-09T22:26:00.470Z
Answers.LastActivityDate: 2021-04-09T22:26:00.470Z
Answers.UserDisplayName: vonbrand
Answers.Body: <p>Disclaimer 1: I haven't seen the book, and I have no idea what exercises it offers.</p>
  <p>Disclaimer 2: I haven't seen your brother's code.</p>
  <p>The goal of an easy exercise is to learn how to write the perfect code. OTOH, the beginner's code tends to be sloppy. For starters, point your brother to the <a href="https://codereview.stackexchange.com">Code Review</a> exchange.</p>
  <p>When the community is comfortable, let him go on to implement classic algorithms. <a href="https://en.cppreference.com/w/cpp/algorithm" rel="nofollow noreferrer">Algorithms library</a> of STL is a good starting point. When he is comfortable with it, proceed with Cormen's <em>Introduction to Algorithms</em>.</p>
  <p>The next step is highly subjective. In my opinion, every programmer shall eventually work the way through Charles Wetherell's Etudes for Programmers; arguably the best collection of exercises of various toughness. I wish I had this book when I was still a student. It is not for novices though.</p>
  <p>PS: Don't let him do Project Euler (unless he is mathematically inclined). Don't let him folow the competitive sites either.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-20T23:05:47.860Z
Answers.Text: Presumably, the book you mention is *Introduction to Algorithms*.
Answers.UserDisplayName: J.G.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-21T01:00:14.573Z
Answers.Text: @J.G. True, thank you. Edited.
Answers.UserDisplayName: user58697
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-21T01:54:24.533Z
Answers.Text: Thank you for your answer.
Answers.UserDisplayName: Helix
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-21T13:01:04.267Z
Answers.Text: Can you explain why you advise against Project Euler?
Answers.UserDisplayName: Jasper
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-21T17:29:56.643Z
Answers.Text: @Jasper Project Euler is not about programming. It is about math. Usually, once you figure out the correct way to approach the problem, the programming part reduces to a one-liner.
Answers.UserDisplayName: user58697
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-20T22:59:56.630Z
Answers.LastActivityDate: 2021-03-21T00:59:48.713Z
Answers.LastEditDate: 2021-03-21T00:59:48.713Z
Answers.UserDisplayName: user58697
Answers.Body: <p>If he wants to have a blast biting into some very fun and challenging problems, <a href="https://projecteuler.net/" rel="noreferrer">Project Euler</a> is fantastic, and entirely language neutral.</p>
  <p>He may find that certain problems are out of his grasp until he learns a bit more programming, but there will be many that will be possible even with what he has.  (Arrays, structs, and pointers should make all of the problems accessible, even if some of them are still possibly too hard as <em>problems</em> before he has a good understanding of linked lists and trees.)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-20T07:37:51.863Z
Answers.Text: It has been my experience that Project Euler problems are *maths* problems and not so much *programming* problems. It's probably not a coincidence that the website is named after one of the most famous mathematicians of all time, not after a programmer. There is nothing in Project Euler that actually teaches the most important parts of programming: abstraction and reuse, and even more importantly, teamwork, communication, and documentation.
Answers.UserDisplayName: Jörg W Mittag
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-21T01:50:03.120Z
Answers.Text: Thanks for the answer. Looking at it, I agree with Jorg that Project Euler is for the very mathematically inclined. It's good for me though!
Answers.UserDisplayName: Helix
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-19T17:53:17.097Z
Answers.LastActivityDate: 2021-03-19T17:53:17.097Z
Answers.UserDisplayName: Ben I.
Answers.Body: <p>Although the question is asking for a book, looking a &quot;Project Euler&quot; mentioned in another answer, I would like to suggest <a href="https://www.codewars.com/" rel="noreferrer">Codewars</a> might be what you are looking for. On codewars you choose your programming language and then you get different levels of problems to solve step by step. You not only test your answer with their built-in testing tool but also once correctly answered, you get to see other users answers. This is very useful because you see many different ways to solve the same problem and compare your way of doing it to others.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-21T01:50:19.283Z
Answers.Text: Thank you for your answer, this looks great!
Answers.UserDisplayName: Helix
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-20T09:09:07.250Z
Answers.LastActivityDate: 2021-03-20T09:09:07.250Z
Answers.UserDisplayName: moddayjob
Answers.Body: <p>The <a href="https://ioinformatics.org/" rel="noreferrer">International Olympiad in Informatics</a> is an international competition for gifted young amateur programmers. The tasks from past editions are <a href="https://ioinformatics.org/page/contests/10" rel="noreferrer">available online</a>, including detailed problem descriptions, test cases, and test harnesses.</p>
  <p>While these tasks are described in a way that should be understandable to novice programmers, they are quite challenging and require a degree of creative thought not usually found in programming exercises.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-21T01:54:08.527Z
Answers.Text: Thank you for your answer.
Answers.UserDisplayName: Helix
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-20T08:37:19.493Z
Answers.LastActivityDate: 2021-03-20T08:37:19.493Z
Answers.UserDisplayName: meriton
Body: <p>I am asking this question on behalf of my brother. He is taking his first programming class. So far he has just learned the basics (if-then statements, for loops, while loops, etc.)</p>
  <p>The class is using the book Problem Solving and Program Design in C, but it's exercises are too easy. Is there a programming book or other resource that has more difficult exercises? Of course, the book doesn't have to be for C specifically, as we just need the problems.</p>
  
Tags: <textbook><exercises>
Title: Reference request for resource with difficult programming exercises
ThreadText: # Reference request for resource with difficult programming exercises
  
  (Asked by: username_0 on 2021-03-19)
  
  I am asking this question on behalf of my brother. He is taking his first programming class. So far he has just learned the basics (if-then statements, for loops, while loops, etc.)
  
  The class is using the book Problem Solving and Program Design in C, but it's exercises are too easy. Is there a programming book or other resource that has more difficult exercises? Of course, the book doesn't have to be for C specifically, as we just need the problems.
  
  **Tags:** textbook, exercises
  
  
  ---
  
  ## 6 answers
  
  ### Answer by username_2 on 2021-03-20. Score: 3 | Accepted answer
  
  Disclaimer 1: I haven't seen the book, and I have no idea what exercises it offers.
  
  Disclaimer 2: I haven't seen your brother's code.
  
  The goal of an easy exercise is to learn how to write the perfect code. OTOH, the beginner's code tends to be sloppy. For starters, point your brother to the [Code Review](https://codereview.stackexchange.com) exchange.
  
  When the community is comfortable, let him go on to implement classic algorithms. [Algorithms library](https://en.cppreference.com/w/cpp/algorithm) of STL is a good starting point. When he is comfortable with it, proceed with Cormen's *Introduction to Algorithms*.
  
  The next step is highly subjective. In my opinion, every programmer shall eventually work the way through Charles Wetherell's Etudes for Programmers; arguably the best collection of exercises of various toughness. I wish I had this book when I was still a student. It is not for novices though.
  
  PS: Don't let him do Project Euler (unless he is mathematically inclined). Don't let him folow the competitive sites either.
  
  > **Comments:**
  > **username_3**: Presumably, the book you mention is *Introduction to Algorithms*.  
  > **username_2**: @J.G. True, thank you. Edited.  
  > **username_0**: Thank you for your answer.  
  > **username_4**: Can you explain why you advise against Project Euler?  
  > **username_2**: @username_4 Project Euler is not about programming. It is about math. Usually, once you figure out the correct way to approach the problem, the programming part reduces to a one-liner.  
  
  ---
  
  ### Answer by username_5 on 2021-03-19. Score: 6
  
  If he wants to have a blast biting into some very fun and challenging problems, [Project Euler](https://projecteuler.net/) is fantastic, and entirely language neutral.
  
  He may find that certain problems are out of his grasp until he learns a bit more programming, but there will be many that will be possible even with what he has. (Arrays, structs, and pointers should make all of the problems accessible, even if some of them are still possibly too hard as *problems* before he has a good understanding of linked lists and trees.)
  
  > **Comments:**
  > **username_6**: It has been my experience that Project Euler problems are *maths* problems and not so much *programming* problems. It's probably not a coincidence that the website is named after one of the most famous mathematicians of all time, not after a programmer. There is nothing in Project Euler that actually teaches the most important parts of programming: abstraction and reuse, and even more importantly, teamwork, communication, and documentation.  
  > **username_0**: Thanks for the answer. Looking at it, I agree with Jorg that Project Euler is for the very mathematically inclined. It's good for me though!  
  
  ---
  
  ### Answer by username_7 on 2021-03-20. Score: 6
  
  Although the question is asking for a book, looking a "Project Euler" mentioned in another answer, I would like to suggest [Codewars](https://www.codewars.com/) might be what you are looking for. On codewars you choose your programming language and then you get different levels of problems to solve step by step. You not only test your answer with their built-in testing tool but also once correctly answered, you get to see other users answers. This is very useful because you see many different ways to solve the same problem and compare your way of doing it to others.
  
  > **Comments:**
  > **username_0**: Thank you for your answer, this looks great!  
  
  ---
  
  ### Answer by username_8 on 2021-03-20. Score: 5
  
  The [International Olympiad in Informatics](https://ioinformatics.org/) is an international competition for gifted young amateur programmers. The tasks from past editions are [available online](https://ioinformatics.org/page/contests/10), including detailed problem descriptions, test cases, and test harnesses.
  
  While these tasks are described in a way that should be understandable to novice programmers, they are quite challenging and require a degree of creative thought not usually found in programming exercises.
  
  > **Comments:**
  > **username_0**: Thank you for your answer.  
  
  ---
  
  ### Answer by username_1 on 2021-04-22. Score: 1
  
  The book by Jeff Erickson, ["Algorithms"](http://jeffe.cs.illinois.edu/teaching/algorithms/) is a (tough!) next step after getting confortable with the basics.
  
  > **Comments:**
  > **username_0**: Thanks, will check it out.  
  
  ---
  
  ### Answer by username_1 on 2021-04-09. Score: 1
  
  Not exactly exercises, but you learn a lot about programming by working through books like Kernighan and Pike's "The practice of programming" (Addison-Wesley, 1999) and Bentley's "Programming Pearls" (Addison Wesley, 2nd edition 1999). They are *not* books on any language's syntax, they show how to solve though problems elegantly.
  
  Be advised that those scoundrels have a knack of making hard problems seem almost trivial, with solutions of a couple dozen lines.
  
  
  ---
  
  