9 Miscellaneous problems

Throughout this book we have covered a myriad of problem-solving techniques relevant to modern software development tasks. To study each technique, we have explored famous computer science problems. But not every famous problem fits the mold of the prior chapters. This chapter is a gathering point for famous problems that did not quite fit into any other chapter. Think of these problems as a bonus: more interesting problems with less scaffolding around them.

9.1 The knapsack problem

The knapsack problem is an optimization problem that takes a common computational need--finding the best use of limited resources given a finite set of usage options--and spins it into a fun story. A thief enters a home with the intent to ...

Get Classic Computer Science Problems in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.