Red-Green-Code

Deliberate practice techniques for software developers

Book Review – Algorithmic Thinking: A Problem-Based Introduction

By Duncan Smith Sep 14 0

As any student pursuing a technical degree knows, problem sets are a big part of math, physics, and engineering classes. Computer science works a bit differently. While CS theory classes use problem sets similar to those in math and science, other classes often require CS students to turn in code that compiles and runs. Some of these programs are for major projects related to networking, operating systems, or graphics, while others are solutions to short algorithm problems.

Because of the way coding interviews work, programmers must be able to solve short algorithm problems even after they graduate and enter the workforce. As a result, coding assignments in these areas have escaped the campus and are available to the public on websites like Codeforces and LeetCode. Anyone who wants to learn these topics can submit their programs to an online judge, which runs them against dozens of test cases that verify correctness, performance, and resource usage.

Despite the popularity of interview prep sites, not all algorithms textbooks have bought into the online judge approach. Introduction to Algorithms (CLRS to those in the know) famously uses pseudocode in its examples. Good luck compiling and running those. Robert Sedgewick’s algorithms books offer actual code in multiple programming languages. But the exercises at the end of each chapter are traditional textbook problems, graded manually by the student (if they can find an answer key) or by an instructor. Even Cracking the Coding Interview , the popular prep book by Gayle Laakmann McDowell, is mostly paper-based. The book includes solutions, which you can compare with your own code. But the only way to find out for sure that your solution works is to come up with test data and run your program against it. (A few years ago, CtCI had an arrangement with HackerRank to host questions in an online judge format, but apparently it wasn’t a permanent deal).

Paper and pencil are good for sketching binary trees, working out the details of an asymptotic analysis, or planning a solution approach. But if you want to verify that you can implement an algorithm correctly and efficiently, the gold standard is running it against a suite of test cases that an expert has carefully chosen. That’s the philosophy behind Algorithmic Thinking: A Problem-Based Introduction , a new book by Daniel Zingaro, Associate Professor of Mathematical and Computational Sciences at the University of Toronto Mississauga.

Algorithms for Competitive Programming

Algorithmic Thinking is not a competitive programming manual. In the introduction, Dr. Zingaro writes, “My goal is not to turn you into a competitive programmer, though I’d take that as a happy side benefit.” But all the problems in the book come from online judges and programming competitions, which means they are self-grading.

The book also isn’t an encyclopedia of algorithms, like CLRS or Sedgewick. It doesn’t cover every algorithm you might need in a class or contest. Instead, it explores a selection of classic algorithms, data structures, and techniques to find out what they can teach about solving problems with computers.

Try the Problem First

Here’s a question from Quora:

  • Should I learn all DS and Algos first to start competitive programming? Or I can just start practicing from CodeChef, learn the DS and Algos with it?

Or to put it another way:

  • What basic data structures and algorithms should one learn before starting competitive programming?

These are popular questions, maybe because of how technical classes traditionally work: First you attend a lecture to learn some ideas, and then you work on a problem set that uses what you learned in the lecture. Repeat with the next lecture and the next problem set.

Algorithmic Thinking takes the opposite approach: The first thing you encounter in each chapter is a description of the first problem to be solved in that chapter. Algorithms, data structures, and techniques appear only when they’re needed for the problem. For example, Chapter 3 (“If you’re going to read one chapter in this book, read this one”) introduces UVa 10465 , the Homer Simpson problem, and uses it to explain memoization and dynamic programming.

Reading Editorials

The best way to read Algorithmic Thinking is to treat it like a problem set that comes packaged with the world’s most detailed answer key. Here’s the plan: Don’t spoil the surprise by reading the answer key first. Instead, before starting the introduction, skip straight to Appendix C, which lists the 25 problems covered in the book’s 359 pages. (That’s over 14 pages per problem. I wasn’t kidding when I said it was detailed). The problems are all available online, so search for the first one ( Food Lines from DMOJ) and submit a solution, or spend a reasonable amount of time trying. Once you get everything you can out of the problem, start reading the introduction. If you weren’t able to solve the problem on your own, read just enough to get a hint, which might unblock you. If you did solve the problem on your own, you might still find ideas to make your solution more efficient or elegant.

In competitive programming jargon, an editorial explains how to solve a programming problem. It covers how to approach the problem, which algorithms and data structures to use, and how to write the code to solve it. So you could interpret the chapters in Algorithmic Thinking as editorials for 25 competitive programming problems. But there are a few ways in which this book is preferable to editorials one might find online:

Problem selection : There are thousands of contest problems out there, but only 25 in this book. As Dr. Zingaro explains in Chapter 1, he didn’t select the problems arbitrarily. Each one had to use one of the algorithms or data structures selected for the book, and it had to be “algorithmically complex” enough to be challenging but also “sufficiently simple” to avoid confusing the reader with irrelevant details. That’s the value that an expert provides when selecting the right set of practice problems. And when those problems are collected in a book, they can be ordered so that subsequent problems build on lessons learned from earlier ones.

Level of detail : As I mentioned earlier, the book devotes quite a few pages to each problem. There’s enough space to solve the problem in multiple ways, showing how different data structures affect runtime. The text explains each line of code, so that once you finish reading the explanation, you really know what the problem is about.

Quality control : While you can find an editorial for many contest problems, there’s no guarantee that it will be understandable. In contrast, Algorithmic Thinking offers clear writing and professional editing. Even the problem descriptions have been rewritten to eliminate the notoriously obfuscated prose that competitive programming problems use, so the reader can focus on learning the algorithms.

Dr. Zingaro chose the 25 problems in Algorithmic Thinking to support the set of algorithms, data structures, and techniques that he thought would best serve the goals of a problem-based introduction to algorithmic thinking. Here are the principal topics in each chapter:

0: Arrays; introduction to the online judge problem format

1: Hash tables

2: Trees and recursion

3: Memoization and dynamic programming

4: Graphs and breadth-first search

5: Shortest paths in weighted graphs

6: Binary search

7: Heaps and segment trees

8: Union-find

Other algorithms, data structures, and techniques also appear when needed. For example, a stack (implemented from scratch) shows up in Chapter 2, and greedy algorithms are used in Chapters 3, 5 (Dijkstra’s algorithm), and 6. But the goal is not comprehensive coverage. There are a lot of algorithm books out there. As explained in the introduction, each topic made it into the book because it was broadly applicable, could be implemented in at most 150 lines of C code, and because a concise argument could be made about correctness without getting into a formal proof. That’s the niche occupied by this book.

The C Programming Language

150 lines of what kind of code? Yes, the only programming language you’ll find in Algorithmic Thinking is the C programming language. Not C++, just C. It’s been a while since I have done any C programming, but according to one measurement, it’s the #1 most popular language as of September 2020, so there you go. (Stack Overflow puts it at number 11 . It all depends how you measure).

The choice of C is intentional. Dr. Zingaro says in the Introduction that he wants “to teach you data structures and algorithms from the ground up. When we want a hash table, we’ll build it ourselves.” I understand this decision. Algorithms are a fundamental topic in programming. They’re at a lower level than topics like databases or networking. So building your own data structures and handling your own memory management isn’t out of place in a discussion of algorithms. (And it’s not like we’re being asked to go full Knuth and write all the algorithms in assembly language for a theoretical CPU). The book isn’t even excessively dogmatic about building every tool: A few solutions use the built-in C qsort function rather than implementing a custom sort algorithm from scratch.

In my work, I spend most of my time with languages at a Java level of abstraction. When I’m solving competitive programming problems, I like to have a wide range of built-in collection classes and other facilities available. But I didn’t have any problem following the C code in the book or the explanations. For example, it was interesting to review how hash functions work (Chapter 1) even though I usually rely on library functions to implement them.

Food for Thought

“While there may be millions of problems out there, there are far fewer algorithms. The best algorithms are often the ones that rest on ideas so flexible that they can ooze beyond their intended purpose” (Chapter 5). Programming contests are all about starting with a limited set of standard algorithms and inventing wacky scenarios to see if contestants can tweak the algorithms they’re familiar with to solve each problem in the allotted time.

“Hold on! Why are we letting these officious test cases bully us into producing these awful trees?” (Chapter 8). It’s true. If you aren’t careful, test data can mean the difference between Accepted and TLE in a contest.

“Binary search turns a ‘solve this’ problem into a ‘check this’ problem” (Afterword). I’ll bet you didn’t know that about binary search.

Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your Coding Skills

Description.

Get in the game and learn essential computer algorithms by solving competitive programming problems, in the fully revised second edition of the bestselling original. (Still no math required!) Are you hitting a wall with data structures and algorithms? Whether you’re a student prepping for coding interviews or an independent learner, this book is your essential guide to efficient problem-solving in programming. UNLOCK THE POWER OF DATA STRUCTURES & ALGORITHMS: Learn the intricacies of hash tables, recursion, dynamic programming, trees, graphs, and heaps. Become proficient in choosing and implementing the best solutions for any coding challenge. REAL-WORLD, COMPETITION-PROVEN CODE EXAMPLES: The programs and challenges in this book aren’t just theoretical—they’re drawn from real programming competitions. Train with problems that have tested and honed the skills of coders around the world. GET INTERVIEW-READY: Prepare yourself for coding interviews with practice exercises that help you think algorithmically, weigh different solutions, and implement the best choices efficiently. WRITTEN IN C, USEFUL ACROSS LANGUAGES: The code examples are written in C and designed for clarity and accessibility to those familiar with languages like C++, Java, or Python. If you need help with the C code, no problem: We’ve got recommended reading, too. Algorithmic Thinking is the complete package, providing the solid foundation you need to elevate your coding skills to the next level.

About the Author

Dr. Daniel Zingaro is an award-winning associate professor of mathematical and computational sciences at the University of Toronto Mississauga. He is well known for his uniquely interactive approach to teaching and internationally recognized for his expertise in active learning. He is also the author of Learn to Code by Solving Problems (No Starch Press) and co-author of Learn AI-Assisted Python Programming .

Praise for Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your Coding Skills

"Algorithmic Thinking provides the theoretical background and detailed problem explanations required to stay ahead of our human and robotic competitors." —Duncan Smith, Senior Software Engineer at Microsoft "In this newly revised edition, Daniel presents a carefully curated collection of challenging programming problems. By deconstructing the problems alongside clear, practical presentations of algorithms and data structures, Algorithmic Thinking will empower you–whether you're looking to get a leg up on technical interviews, enter the world of competitive programming, or just want to sharpen your skills." —Josh Lospinoso, Ph.D., author of C++ Crash Course "As someone who learnt algorithms from similar problems-oriented books in the early 00s, I believe an updated yet beginner-friendly exposition is long overdue. This book provides implementation-friendly introductions to most building blocks of combinatorial algorithms . . . It's by far the quickest way to get hands-on experience with algorithms, and is also a great supplement to more theoretical expositions." —Richard Peng, Associate Professor at the University of Waterloo’s Cheriton School of Computer Science "Not only does Algorithmic Thinking guide readers on how to approach tackling problems, but Zingaro also helps them understand why these approaches work. With an engaging selection of problems drawn from programming competitions, the book is an excellent guide and an engaging companion for the readers on their learning journey." —Sushant Sachdeva, Ph.D., Algorithms Professor at the University of Toronto "The step-by-step solution explanations are so detailed that it feels like Daniel is directly teaching us, his readers. This Second Edition is a worthy update to an already excellent text. I particularly like the new chapter on the rarely discussed randomized algorithms. I believe Computer Science students will enjoy reading it as I do." —Dr Steven Halim, Senior Lecturer at National University of Singapore "The book discusses many interesting problems from programming contests and presents useful techniques that are not often included in algorithm textbooks." —Antti Laaksonen, University of Helsinki "Now a fully updated and expanded second edition, Daniel Zingaro's Algorithmic Thinking: Unlock Your Programming Potential from No Starch Press is an ideal, comprehensive, and thoroughly 'user friendly' instructional resource for C Programming Language students and software development professionals alike." —Midwest Book Review

You May Also Like

#HashtagActivism: Networks of Race and Gender Justice

#HashtagActivism: Networks of Race and Gender Justice

The Promise of Artificial Intelligence: Reckoning and Judgment

The Promise of Artificial Intelligence: Reckoning and Judgment

The Man from the Future: The Visionary Ideas of John von Neumann

The Man from the Future: The Visionary Ideas of John von Neumann

Fluid Mechanics: A Very Short Introduction (Very Short Introductions)

Fluid Mechanics: A Very Short Introduction (Very Short Introductions)

Prediction Machines, Updated and Expanded: The Simple Economics of Artificial Intelligence

Prediction Machines, Updated and Expanded: The Simple Economics of Artificial Intelligence

Automata Theory: An Algorithmic Approach

Automata Theory: An Algorithmic Approach

Enacting Platforms: Feminist Technoscience and the Unreal Engine (Platform Studies)

Enacting Platforms: Feminist Technoscience and the Unreal Engine (Platform Studies)

Ultra-Processed People: The Science Behind Food That Isn't Food

Ultra-Processed People: The Science Behind Food That Isn't Food

The Second Machine Age: Work, Progress, and Prosperity in a Time of Brilliant Technologies

The Second Machine Age: Work, Progress, and Prosperity in a Time of Brilliant Technologies

Hidden in White Sight: How AI Empowers and Deepens Systemic Racism

Hidden in White Sight: How AI Empowers and Deepens Systemic Racism

The Unreliable Nation: Hostile Nature and Technological Failure in the Cold War (Inside Technology)

The Unreliable Nation: Hostile Nature and Technological Failure in the Cold War (Inside Technology)

The Voice Catchers: How Marketers Listen In to Exploit Your Feelings, Your Privacy, and Your Wallet

The Voice Catchers: How Marketers Listen In to Exploit Your Feelings, Your Privacy, and Your Wallet

The Tone of Our Times: Sound, Sense, Economy, and Ecology (Leonardo)

The Tone of Our Times: Sound, Sense, Economy, and Ecology (Leonardo)

Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming

Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming

Computational Thinking Education in K-12: Artificial Intelligence Literacy and Physical Computing

Computational Thinking Education in K-12: Artificial Intelligence Literacy and Physical Computing

Machines We Trust: Perspectives on Dependable AI

Machines We Trust: Perspectives on Dependable AI

From Data to Profit: How Businesses Leverage Data to Grow Their Top and Bottom Lines

From Data to Profit: How Businesses Leverage Data to Grow Their Top and Bottom Lines

Algorithms of Resistance: The Everyday Fight against Platform Power

Algorithms of Resistance: The Everyday Fight against Platform Power

Be the Business: Cios in the New Era of It

Be the Business: Cios in the New Era of It

Probabilistic Robotics (Intelligent Robotics and Autonomous Agents series)

Probabilistic Robotics (Intelligent Robotics and Autonomous Agents series)

Friending the Past: The Sense of History in the Digital Age

Friending the Past: The Sense of History in the Digital Age

Generative AI: How ChatGPT and Other AI Tools Will Revolutionize Business

Generative AI: How ChatGPT and Other AI Tools Will Revolutionize Business

Make: Fire: The Art and Science of Working with Propane

Make: Fire: The Art and Science of Working with Propane

The Technology Fallacy: How People Are the Real Key to Digital Transformation (Management on the Cutting Edge)

The Technology Fallacy: How People Are the Real Key to Digital Transformation (Management on the Cutting Edge)

50 Math Ideas You Really Need to Know (50 Maths Ideas You Really Need to Know)

50 Math Ideas You Really Need to Know (50 Maths Ideas You Really Need to Know)

March 4, anniversary edition: Scientists, Students, and Society

March 4, anniversary edition: Scientists, Students, and Society

What the Digital Future Holds: 20 Groundbreaking Essays on How Technology Is Reshaping the Practice of Management (The Digital Future of Management)

What the Digital Future Holds: 20 Groundbreaking Essays on How Technology Is Reshaping the Practice of Management (The Digital Future of Management)

Numbers: 10 Things You Should Know

Numbers: 10 Things You Should Know

Sign up to receive our newsletter.

News and information from Kendall Square's underground bookstore

Home

Shopping cart

There are no products in your shopping cart.

0 Items $0.00

Algorithmic Thinking, 2nd Edition Cover

Algorithmic Thinking, 2nd Edition

Download Chapter 1: Hash Tables

Look Inside!

Algorithmic Thinking 2e back cover

Are you hitting a wall with data structures and algorithms? Whether you’re a student prepping for coding interviews or an independent learner, this book is your essential guide to efficient problem-solving in programming.

UNLOCK THE POWER OF DATA STRUCTURES & ALGORITHMS: Learn the intricacies of hash tables, recursion, dynamic programming, trees, graphs, and heaps. Become proficient in choosing and implementing the best solutions for any coding challenge.

REAL-WORLD, COMPETITION-PROVEN CODE EXAMPLES: The programs and challenges in this book aren’t just theoretical—they’re drawn from real programming competitions. Train with problems that have tested and honed the skills of coders around the world.

GET INTERVIEW-READY: Prepare yourself for coding interviews with practice exercises that help you think algorithmically, weigh different solutions, and implement the best choices efficiently.

WRITTEN IN C, USEFUL ACROSS LANGUAGES: The code examples are written in C and designed for clarity and accessibility to those familiar with languages like C++, Java, or Python. If you need help with the C code, no problem: We’ve got recommended reading, too.

Algorithmic Thinking is the complete package, providing the solid foundation you need to elevate your coding skills to the next level.

Dr. Daniel Zingaro is an award-winning Assistant Professor of Mathematical and Computational Sciences at the University of Toronto Mississauga. He is well known for his uniquely interactive approach to teaching and internationally recognized for his expertise in active learning. He is also the author of Learn to Code by Solving Problems (No Starch Press, 2021) and co-author of Learn AI-Assisted Python Programming .

Foreword Introduction Acknowledgments Chapter 1: Hash Tables Chapter 2: Trees and Recursion Chapter 3: Memoization and Dynamic Programming Chapter 4: Advanced Memoization and Dynamic Programming Chapter 5: Graphs and Breadth-First Search Chapter 6: Shortest Paths in Weighted Graphs Chapter 7: Binary Search Chapter 8: Heaps and Segment Trees Chapter 9: Union-Find Chapter 10: Randomization Afterword Appendix A: Algorithm Runtime Appendix B: Because I Can’t Resist Appendix C: Problem Credits Index

View the Copyright page View the detailed Table of Contents View the Index

"Algorithmic Thinking  provides the theoretical background and detailed problem explanations required to stay ahead of our human and robotic competitors." —Duncan Smith, Senior Software Engineer at Microsoft

"Now a fully updated and expanded second edition, Daniel Zingaro's Algorithmic Thinking: Unlock Your Programming Potential from No Starch Press is an ideal, comprehensive, and thoroughly 'user friendly' instructional resource for C Programming Language students and software development professionals alike." —Midwest Book Review

"In this newly revised edition, Daniel presents a carefully curated collection of challenging programming problems. By deconstructing the problems alongside clear, practical presentations of algorithms and data structures, Algorithmic Thinking will empower you–whether you're looking to get a leg up on technical interviews, enter the world of competitive programming, or just want to sharpen your skills." —Josh Lospinoso, Ph.D., author of C++ Crash Course

"As someone who learnt algorithms from similar problems-oriented books in the early 00s, I believe an updated yet beginner-friendly exposition is long overdue. This book provides implementation-friendly introductions to most building blocks of combinatorial algorithms . . . It's by far the quickest way to get hands-on experience with algorithms, and is also a great supplement to more theoretical expositions." —Richard Peng, Associate Professor at the University of Waterloo’s Cheriton School of Computer Science

"Not only does Algorithmic Thinking guide readers on how to approach tackling problems, but Zingaro also helps them understand why these approaches work. With an engaging selection of problems drawn from programming competitions, the book is an excellent guide and an engaging companion for the readers on their learning journey." — Sushant Sachdeva, Ph.D., Algorithms Professor at the University of Toronto

"The step-by-step solution explanations are so detailed that it feels like Daniel is directly teaching us, his readers. This Second Edition is a worthy update to an already excellent text. I particularly like the new chapter on the rarely discussed randomized algorithms. I believe Computer Science students will enjoy reading it as I do." —Dr Steven Halim, Senior Lecturer at National University of Singapore

"The book discusses many interesting problems from programming contests and presents useful techniques that are not often included in algorithm textbooks." —Antti Laaksonen, University of Helsinki

Reviews for the 1st edition:

"A good choice for anyone who needs to understand and implement algorithms." — RedGreenCode

“With Zingaro as a tutor by your side, you'll learn, through practice on challenging competition problems, a repeatable process for figuring out and deftly applying the most appropriate algorithmic tools for the job. You'll learn it all from a book that exudes clarity, humor, and just the right dose of Canadian pride. Happy problem-solving!” — Dr. Tim Roughgarden, Professor of Computer Science at Columbia University

"A clear and engaging text . . . By presenting problems first and their algorithm/data structure solutions later, it shows us exactly why those solutions are useful and how they fit into the big picture. . . . Far too many textbooks present solutions fully-formed with no mention of the dead ends and too-complicated solutions you’d hit along the way. But Algorithmic Thinking takes you from the initial idea to the final breakthrough, setbacks and all. Problem solving is a raw, real journey, and this book captures its spirit perfectly. I highly recommend it." —Ava Pun, medal winner in the International Olympiad in Informatics Programming Competition

"A good introduction to some important competitive programming techniques." — Antti LAAKSONEN, Olympiads in Informatics

View the supplementary resources for the book, including downloadable code and additional exercises available.

Algorithmic Thinking: A Problem-Based Introduction Homepage for the book Algorithmic Thinking: A Problem-Based Introduction About Downloadable Code Exercises Contact and Newsletter

Book review: guide to competitive programming.

algorithmic thinking book review

Hi everyone,

Readers who’ve worked through the material in Algorithmic Thinking might be interested to know what’s out there to read next. In the book, I offer some pointers to more traditional algorithms textbooks that you might consider if you’d like to dig deeper into the theory of algorithms.

But if I’ve managed to whet your appetite for competitive programming, then you might consider wrestling with one of the advanced competitive programming books that are available.

In this post, I review the book Guide to Competitive Programming by Antti Laaksonen. (There’s a free version that contains much of what’s in the sale version, if you want to get a taste before deciding whether to buy.) I think it pairs well with Algorithmic Thinking . If you’re getting stuck in Dr. Laaksonen’s book, you might consider reading through Algorithmic Thinking again, and I’ll point out below where Algorithmic Thinking might be particularly helpful. Make no mistake, though: there’s a lot here. The book can be terse. And there are sections in Dr. Laaksonen’s book that are particularly hard core. I need to work through some of it again myself! But if you have the patience and desire to up your competitive programming game, this book can bring it.

The book has 15 chapters. I’ll note here what might be of most interest to those who’ve read my Algorithmic Thinking book as background.

Chapter 1, Introduction . This is a brief intro to competitive programming; most of the material will be familiar to my readers. The book uses C++ as its programming language, and this chapter explains why. (I used C in Algorithmic Thinking , not C++, because my goals were different: peering under the hood rather than getting you ready for fast-paced programming competitions.)

Chapter 2, Programming Techniques . This chapter starts with a very brief intro to C++, including how to read input and write output. If you prefer scanf and printf as I taught it in Algorithmic Thinking , you can continue to use those, or you can jump to the C++ streams approach introduced here. There’s some material here on reducing the amount of code you need to type. It makes the code less transparent, but these are the kinds of tricks you might use yourself in competitions (or might see when reading editorials by other competitors). There’s also a lightning-fast review of recursion, and you should be ready for that if you’ve worked through Chapters 2 and 3 of Algorithmic Thinking . The chapter ends with a summary of bit-manipulation techniques: low-level programming techniques that can be a little opaque but are extremely efficient. One of my favourite tricks here is using bit manipulation to generate all subsets of a set of values. Neat!

Chapter 3, Efficiency . This chapter starts with a rundown of big O, along the lines of what we do in Appendix A. There’s a pretty cool table here that helps you use the input size of a problem to reverse-engineer the big O efficiency that the problem author had in mind. That could help narrow down the kind of algorithm that you design. There’s also a formal definition of big O – the sort of thing you’d find in a typical algorithms textbook. But I think the most useful bit of this chapter is the algorithm design section, where you’ll walk through solving two problems (Maximum Subarray Sum, and number of ways to place two queens on a chessboard) with more and more efficient algorithms.

Chapter 4, Sorting and Searching . In Algorithmic Thinking , we use the C qsort function whenever we need to sort. This chapter starts with a classical treatment of how to implement three sorting algorithms: bubble sort, merge sort, and counting sort. You’re unlikely to need this material for competitive programming, but it’s interesting nonetheless. Remember how I spent an entire chapter, Chapter 6, on binary search? How binary search often offers super-fast solutions to tough problems? Sorting can be like that, too, and this chapter shows how through several examples. Speaking of binary search: that’s here, too, but very briskly compared to my treatment in Algorithmic Thinking .

Chapter 5, Data Structures . Here’s where we avail ourselves of the built-in C++ data structures; during a timed competition, we should use these whenever we can! Here we have dynamic arrays (vectors), iterators and ranges, double-ended queues, stacks, queues, sets, multisets, maps (i.e. dictionaries), priority queues, and more. Yeah, there are a lot of them. How do we choose among them? Sometimes it comes down to efficiency; the chapter does a good job of exploring their efficiency in practice.

Chapter 6, Dynamic Programming . This is an introduction to dynamic programming using the classical examples of coin change, longest increasing subsequence, finding an optimal path through a grid, and knapsack. You’ll be ready for this material once you’ve worked through Chapter 3 of Algorithmic Thinking .

I’ve already noted that this book can be tough going. Still, there’s a further difficulty bump in the next example of this chapter: using dynamic programming for optimal elevator utilization. I like the presentation, though, and I think this is the kind of thing that can influence your perception of the strengths and limitations of dynamic programming. (Before you tackle this elevator problem, you might consider reading up on how you can use dynamic programming to solve the Traveling Salesperson Problem, whose presentation might be a little easier to absorb.)

Chapter 7, Graph Algorithms . You’ll be familiar with some of this material from chapters 4, 5, and 8 of Algorithmic Thinking : graph terminology, adjacency lists, adjacency matrices, breadth-first search, determining whether two nodes are connected, Dijkstra’s Algorithm, etc. You’ll also find a brief discussion of depth-first search here, along with more advanced algorithms that I don’t cover, including those for spanning trees. There’s also nice material on how dynamic programming can be used to solve problems on acyclic graphs.

Chapter 8, Algorithm Design Topics . This is a grabbag of tricks that can help increase the efficiency of your algorithms or show that your algorithms are more efficient than they may seem. We begin with more material on bit manipulation, which shows how to replace loops by more efficient bit operations.

Suppose you design an algorithm that performs $n$ operations. Once in a while, an operation takes $n$ steps; but, usually, each operation takes only $1$ step. So we have $n$ operations, each of which takes at most $n$ steps. Is this an $O(n^2)$ algorithm, then? Well, not necessarily, and the way to analyze this kind of algorithm is using amortized analysis. That technique is introduced, through well-chosen examples, in this chapter; this is one of my favourite sections in the book.

Chapter 9, Range Queries . My readers will be ready for this: I covered Range Sum Queries and Range Minimum Queries in Algorithmic Thinking (chapters 6 and 7). Remember what you learned about Segment Trees? This chapter shows another kind of tree, the Binary Index Tree, that I personally find more confusing than Segment Trees but may nevertheless be worth learning for its compact code.

There’s a lot in those first nine chapters. Still, here we reach what I think of as a natural split point in the book, with the subsequent material still more advanced than what came before.

Chapter 10, Tree Algorithms . This is a deep dive into algorithms on trees. Chapters 2 and 3 of Algorithmic Thinking are good rampup material for this. Among other techniques, you’ll learn how to use dynamic programming to answer queries on trees.

Chapter 11, Mathematics , and Chapter 13, Geometry . There are competitive programming problems that require the use of mathematics (prime numbers, techniques for counting, matrices, probability) or geometry. These topics are not present in Algorithmic Thinking because I didn’t want to exclude anyone who didn’t have the required background, but they’re necessary for a serious competitor.

Chapter 12, Advanced Graph Algorithms . In Algorithmic Thinking , you learned about the importance of modeling the problem you’re trying to solve. In particular, if you can model the problem as a graph, then you’re well on your way to solving it. I showed how shortest paths can often be used to solve problems, but there are other algorithms that work for different classes of graph problems, too. The most famous of those is Maximum Flow, and that (along with other advanced graph material) is covered here.

Chapter 14, String Algorithms . Problems on strings (in C: arrays of chars) can sometimes be solved with techniques that we already know. Other times, we need algorithms and data structures specialized for string processing. This chapter surveys those algorithms and data structures. For example, you’ll learn about Tries, which are trees well-suited to storing strings.

Chapter 15, Additional Topics . This chapter reprises earlier material to add advanced variants and tricks. For example, you’ll learn how to efficiently support range updates in segment trees, and how to optimize special classes of dynamic programming algorithms. A really neat bit of this chapter shows how designing several (seemingly independent) algorithms for a problem can actually help you design a faster overall solution.

As I hope I’ve made clear, you’ll need considerable background, time, and persistence in order to work through the material in the book. If you’re ready to commit, though, then your time with this book will be well spent. Dr. Laaksonen has concisely and expertly condensed a great deal of competitive programming material into this book. The progression is logical, tradeoffs are illustrated, and sample code fragments are provided.

You may also enjoy:

algorithmic thinking book review

  • Higher Education Textbooks
  • Computer Science

Sorry, there was a problem.

Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet or computer – no Kindle device required .

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera, scan the code below and download the Kindle app.

QR code to download the Kindle App

Image Unavailable

Algorithmic Thinking

  • To view this video download Flash Player

Follow the author

Daniel Zingaro

Algorithmic Thinking Paperback – 15 December 2020

Save extra with 3 offers.

  • Free Delivery

7 days Replacement

  • Amazon Delivered
  • Pay on Delivery
  • Secure transaction
Replacement Reason Replacement Period Replacement Policy
Physical Damage,
Defective,
Wrong and Missing Item
7 days from delivery Replacement

Replacement Instructions

algorithmic thinking book review

Purchase options and add-ons

  • Print length 408 pages
  • Language English
  • Publisher No Starch Press
  • Publication date 15 December 2020
  • Dimensions 17.91 x 2.36 x 23.65 cm
  • ISBN-10 1718500807
  • ISBN-13 978-1718500808
  • See all details

Frequently bought together

Algorithmic Thinking

Customers who viewed this item also viewed

How Computers Really Work: A Hands-On Guide to the Inner Workings of the Machine

Product description

"The strength of the book is that the process of discovering and improving algorithms is described in detail and various different approaches are analyzed. Compared to traditional textbooks, there are also interesting topics that are not usually covered . . . Overall, the book is clearly written, the topics are well-chosen, and the book is a good introduction to some important competitive programming techniques." --Antti Laaksonen, Olympiads in Informatics

About the Author

Product details.

  • Publisher ‏ : ‎ No Starch Press (15 December 2020)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 408 pages
  • ISBN-10 ‏ : ‎ 1718500807
  • ISBN-13 ‏ : ‎ 978-1718500808
  • Item Weight ‏ : ‎ 1 kg 50 g
  • Dimensions ‏ : ‎ 17.91 x 2.36 x 23.65 cm
  • Country of Origin ‏ : ‎ India
  • #264 in Algorithms

About the author

Daniel zingaro.

Dr. Daniel Zingaro is an associate teaching professor of computer science and award-winning teacher at the University of Toronto. His main area of research is computer science education, where he studies how to improve Computer Science teaching and learning.

He has written books on competitive programming, algorithms, Python, and GitHub Copilot and ChatGPT. So, in his professional life he has convinced people that he knows what he's doing -- but his choice of hobbies leads people to question his overall intelligence (see, for example, his skydiving video on YouTube).

Customer reviews

  • 5 star 4 star 3 star 2 star 1 star 5 star 82% 11% 4% 0% 3% 82%
  • 5 star 4 star 3 star 2 star 1 star 4 star 82% 11% 4% 0% 3% 11%
  • 5 star 4 star 3 star 2 star 1 star 3 star 82% 11% 4% 0% 3% 4%
  • 5 star 4 star 3 star 2 star 1 star 2 star 82% 11% 4% 0% 3% 0%
  • 5 star 4 star 3 star 2 star 1 star 1 star 82% 11% 4% 0% 3% 3%
  • Sort reviews by Top reviews Most recent Top reviews

Top reviews from India

Top reviews from other countries.

algorithmic thinking book review

  • Press Releases
  • Amazon Science
  • Sell on Amazon
  • Sell under Amazon Accelerator
  • Protect and Build Your Brand
  • Amazon Global Selling
  • Supply to Amazon
  • Become an Affiliate
  • Fulfilment by Amazon
  • Advertise Your Products
  • Amazon Pay on Merchants
  • Your Account
  • Returns Centre
  • Recalls and Product Safety Alerts
  • 100% Purchase Protection
  • Amazon App Download
 
  • Conditions of Use & Sale
  • Privacy Notice
  • Interest-Based Ads

algorithmic thinking book review

algorithmic thinking book review

Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your... › Customer reviews

Customer reviews.

4 star 3 star 2 star 1 star 5 star 0% 0% 19% 0% 81% 4 star 3 star 2 star 1 star 4 star 0% 0% 19% 0% 0% 4 star 3 star 2 star 1 star 3 star 0% 0% 19% 0% 0% 4 star 3 star 2 star 1 star 2 star 0% 0% 19% 0% 19% 4 star 3 star 2 star 1 star 1 star 0% 0% 19% 0% 0%

Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your Coding Skills

Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your Coding Skills

Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.

To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.

There was a problem filtering reviews right now. Please try again later.

From the united states.

algorithmic thinking book review

There was a problem loading comments right now. Please try again later.

Customer image

  • About Amazon
  • Investor Relations
  • Amazon Devices
  • Amazon Science
  • Sell products on Amazon
  • Sell on Amazon Business
  • Sell apps on Amazon
  • Become an Affiliate
  • Advertise Your Products
  • Self-Publish with Us
  • Host an Amazon Hub
  • › See More Make Money with Us
  • Amazon Business Card
  • Shop with Points
  • Reload Your Balance
  • Amazon Currency Converter
  • Amazon and COVID-19
  • Your Account
  • Your Orders
  • Shipping Rates & Policies
  • Returns & Replacements
  • Manage Your Content and Devices
 
 
 
 
  • Conditions of Use
  • Privacy Notice
  • Consumer Health Data Privacy Disclosure
  • Your Ads Privacy Choices

algorithmic thinking book review

Get full access to C++ and Algorithmic Thinking for the Complete Beginner and 60K+ other titles, with a free 10-day trial of O'Reilly.

There are also live events, courses curated by job role, and more.

C++ and Algorithmic Thinking for the Complete Beginner

C++ and Algorithmic Thinking for the Complete Beginner

Read it now on the O’Reilly learning platform with a 10-day free trial.

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

Book description

Dive into the essentials of C++ and algorithmic thinking with this book. This comprehensive guide is perfect for newcomers looking to build a strong foundation in programming and problem-solving.

Key Features

  • Comprehensive introduction to C++ programming and detailed explanations of algorithmic concepts.
  • Step-by-step setup of development environments, with practical exercises and real-world examples.
  • In-depth coverage of control structures, and visual aids such as trace tables and flowcharts.

Book Description

Embark on your programming journey with a thorough introduction to how computers work, setting the stage for understanding C++ and its applications. This course begins with the basics, including setting up your development environment and installing necessary software packages. As you progress, you'll delve into fundamental algorithmic concepts, variables, constants, and handling input and output efficiently.

As you build your knowledge, the course introduces more complex topics such as sequence control structures, decision-making processes, and loop control structures. You will learn to manipulate numbers, strings, and understand the intricacies of operators through practical exercises and real-world examples. Visual aids like trace tables and flowcharts will help you visualize the flow of your programs and improve your debugging skills.

Towards the end of the course, you'll explore advanced topics such as arrays, data structures, subprograms, and an introduction to object-oriented programming. By the conclusion, you will also gain insights into file handling and advanced algorithmic strategies. Each chapter is designed to build on the previous one, ensuring a cohesive and comprehensive learning experience that equips you with the skills needed to excel in C++ programming and algorithmic thinking.

What you will learn

  • Understand how computers and programming languages work.
  • Master the basics of C++ and integrated development environments.
  • Develop and debug algorithms effectively.
  • Manipulate variables, constants, and data structures.
  • Implement control structures to manage program flow.
  • Create and use subprograms to optimize code.

Who this book is for

This course is designed for complete beginners with no prior programming experience, making it ideal for a wide range of learners. High school students, college students, and self-taught programmers will find this course particularly useful. It’s also suitable for professionals looking to transition into a programming role or enhance their technical skill set. Educators seeking a structured curriculum for teaching C++ can benefit from the course material. Basic computer literacy is recommended, but no prior knowledge of programming is required.

Table of contents

  • Table of Contents
  • About the Author
  • Acknowledgments
  • How This Book is Organized
  • Who Should Buy This Book?
  • Conventions Used in This Book
  • How to Report Errata
  • Where to Download Material About this Book
  • If you Like this Book
  • 1.1 Introduction
  • 1.2 What is Hardware?
  • 1.3 What is Software?
  • 1.4 How a Computer Executes (Runs) a Program
  • 1.5 Compilers and Interpreters
  • 1.6 What is Source Code?
  • 1.7 Review Questions: True/False
  • 1.8 Review Questions: Multiple Choice
  • 2.1 What is C++?
  • 2.2 What is the Difference Between a Script and a Program?
  • 2.3 Why You Should Learn C++
  • 2.4 How C++ Works
  • 2.5 Boost C++ Libraries
  • 2.6 Integrated Development Environments
  • 2.7 Microsoft Visual Studio
  • 3.1 What to Install
  • Review Crossword Puzzles
  • Review Questions
  • 4.1 What is an Algorithm?
  • 4.2 The Algorithm for Making a Cup of Tea
  • 4.3 Properties of an Algorithm
  • 4.4 Okay About Algorithms. But What is a Computer Program Anyway?
  • 4.5 The Three Parties!
  • 4.6 The Three Main Stages Involved in Creating an Algorithm
  • Exercise 4.7-1 Finding the Average Value of Three Numbers
  • 4.8 What are ”Reserved Words”?
  • 4.9 What is the Difference Between a Statement and a Command?
  • 4.10 What is Structured Programming?
  • Exercise 4.11-1 Understanding Control Structures Using Flowcharts
  • 4.12 Your First C++ Program
  • 4.13 What is the Difference Between a Syntax Error, a Logic Error, and a Runtime Error?
  • 4.14 What “Debugging” Means
  • 4.15 Commenting Your Code
  • 4.16 User-Friendly Programs
  • 4.17 Review Questions: True/False
  • 4.18 Review Questions: Multiple Choice
  • 5.1 What is a Variable?
  • 5.2 What is a Constant?
  • 5.3 How Many Types of Variables and Constants Exist?
  • 5.4 Rules and Conventions for Naming Variables and Constants in C++
  • 5.5 What Does the Phrase “Declare a Variable” Mean?
  • 5.6 How to Declare Variables in C++
  • 5.7 How to Declare Constants in C++
  • 5.8 Review Questions: True/False
  • 5.9 Review Questions: Multiple Choice
  • 5.10 Review Exercises
  • 6.1 How to Output Messages and Results to a User's Screen?
  • 6.2 How to Output Special Characters?
  • 6.3 How to Prompt the User to Enter Data?
  • 6.4 Review Questions: True/False
  • 6.5 Review Questions: Multiple Choice
  • 7.1 The Value Assignment Operator
  • 7.2 Arithmetic Operators
  • 7.3 What is the Precedence of Arithmetic Operators?
  • Exercise 7.4-1 Which C++ Statements are Syntactically Correct?
  • Exercise 7.4-2 Finding Variable Types
  • 7.5 Incrementing/Decrementing Operators
  • Exercise 7.6-1 Concatenating Names
  • 7.7 Review Questions: True/False
  • 7.8 Review Questions: Multiple Choice
  • 7.9 Review Exercises
  • Exercise 8.1-1 Creating a Trace Table
  • Exercise 8.1-2 Creating a Trace Table
  • Exercise 8.1-3 Swapping Values of Variables
  • Exercise 8.1-4 Swapping Values of Variables – An Alternative Approach
  • 8.2 Review Questions: True/False
  • 8.3 Review Exercises
  • 9.1 Write, Execute and Debug C++ Programs
  • Exercise 10.1-1 Calculating the Area of a Rectangle
  • Exercise 10.1-2 Calculating the Area of a Circle
  • Exercise 10.1-3 Where is the Car? Calculating Distance Traveled
  • Exercise 10.1-4 Kelvin to Fahrenheit
  • Exercise 10.1-5 Calculating Sales Tax
  • Exercise 10.1-6 Calculating a Sales Discount
  • Exercise 10.1-7 Calculating a Sales Discount and Tax
  • 10.2 Review Exercises
  • 11.1 Introduction
  • Exercise 11.2-1 Calculating the Distance Between Two Points
  • Exercise 11.2-2 How Far Did the Car Travel?
  • 11.3 Review Questions: True/False
  • 11.4 Review Questions: Multiple Choice
  • 11.5 Review Exercises
  • Exercise 12.1-1 Representing Mathematical Expressions in C++
  • Exercise 12.1-2 Writing a Mathematical Expression in C++
  • Exercise 12.1-3 Writing a Complex Mathematical Expression in C++
  • 12.2 Review Exercises
  • Exercise 13.1-1 Calculating the Quotient and Remainder of Integer Division
  • Exercise 13.1-2 Finding the Sum of Digits
  • Exercise 13.1-3 Displaying an Elapsed Time
  • Exercise 13.1-4 Reversing a Number
  • 13.2 Review Exercises
  • 14.1 Introduction
  • 14.2 The Position of a Character in a String
  • Exercise 14.3-1 Displaying a String Backwards
  • Exercise 14.3-2 Switching the Order of Names
  • Exercise 14.3-3 Creating a Login ID
  • Exercise 14.3-4 Creating a Random Word
  • Exercise 14.3-5 Finding the Sum of Digits
  • 14.4 Review Questions: True/False
  • 14.5 Review Questions: Multiple Choice
  • 14.6 Review Exercises
  • Review Crossword Puzzle
  • 15.1 Introduction
  • 15.2 What is a Boolean Expression?
  • Exercise 15.3-1 Filling in the Table
  • Exercise 15.4-1 Calculating the Results of Complex Boolean Expressions
  • 15.5 Assigning the Result of a Boolean Expression to a Variable
  • Exercise 15.6-1 Filling in the Truth Table
  • Exercise 15.6-2 Converting English Sentences to Boolean Expressions
  • 15.7 What is the Order of Precedence of Arithmetic, Comparison, and Logical Operators?
  • Exercise 15.8-1 Negating Boolean Expressions
  • 15.9 Review Questions: True/False
  • 15.10 Review Questions: Multiple Choice
  • 15.11 Review Exercises
  • Exercise 16.1-1 Trace Tables and Single-Alternative Decision Structures
  • Exercise 16.1-2 The Absolute Value of a Number
  • 16.2 Review Questions: True/False
  • 16.3 Review Questions: Multiple Choice
  • 16.4 Review Exercises
  • Exercise 17.1-1 Finding the Output Message
  • Exercise 17.1-2 Trace Tables and Dual-Alternative Decision Structures
  • Exercise 17.1-3 Who is the Greatest?
  • Exercise 17.1-4 Finding Odd and Even Numbers
  • Exercise 17.1-5 Weekly Wages
  • 17.2 Review Questions: True/False
  • 17.3 Review Questions: Multiple Choice
  • 17.4 Review Exercises
  • Exercise 18.1-1 Trace Tables and Multiple-Alternative Decision Structures
  • Exercise 18.1-2 Counting the Digits
  • 18.2 Review Questions: True/False
  • 18.3 Review Exercises
  • Exercise 19.1-1 The Days of the Week
  • 19.2 Review Questions: True/False
  • 19.3 Review Exercises
  • Exercise 20.1-1 Trace Tables and Nested Decision Control Structures
  • Exercise 20.1-2 Positive, Negative or Zero?
  • 20.2 Review Questions: True/False
  • 20.3 Review Exercises
  • 21.1 Introduction
  • Exercise 21.2-1 Designing the Flowchart
  • Exercise 21.2-2 Designing the Flowchart
  • Exercise 21.2-3 Designing the Flowchart
  • 21.3 A Mistake That You Will Probably Make!
  • Exercise 21.4-1 Writing the C++ Program
  • Exercise 21.4-2 Writing the C++ Program
  • Exercise 21.4-3 Writing the C++ Program
  • 21.5 Review Exercises
  • 22.1 Introduction
  • 22.2 Choosing a Decision Control Structure
  • Exercise 22.3-1 “Shrinking” the Algorithm
  • Exercise 22.3-2 “Shrinking” the C++ Program
  • Exercise 22.3-3 “Shrinking” the Algorithm
  • Exercise 22.4-1 Rewriting the Code
  • Exercise 22.4-2 Rewriting the Code
  • Exercise 22.5-1 Merging the Decision Control Structures
  • Exercise 22.5-2 Merging the Decision Control Structures
  • Exercise 22.6-1 “Merging” the Decision Control Structures
  • Exercise 22.7-1 Rearranging the Boolean Expressions
  • 22.8 Why is Code Indentation so Important?
  • 22.9 Review Questions: True/False
  • 22.10 Review Questions: Multiple Choice
  • 22.11 Review Exercises
  • Exercise 23.1-1 Is it an Integer?
  • Exercise 23.1-2 Validating Data Input and Finding Odd and Even Numbers
  • Exercise 23.1-3 Where is the Tollkeeper?
  • Exercise 23.1-4 The Most Scientific Calculator Ever!
  • Exercise 23.1-5 Converting Gallons to Liters, and Vice Versa
  • Exercise 23.1-6 Converting Gallons to Liters, and Vice Versa (with Data Validation)
  • Exercise 23.2-1 Finding the Name of the Heaviest Person
  • Exercise 23.3-1 Finding the Value of y
  • Exercise 23.3-2 Finding the Values of y
  • Exercise 23.3-3 Solving the Linear Equation ax + b = 0
  • Exercise 23.3-4 Solving the Quadratic Equation ax2 + bx + c = 0
  • Exercise 23.4-1 Calculating the Discount
  • Exercise 23.4-2 Validating Data Input and Calculating the Discount
  • Exercise 23.4-3 Sending a Parcel
  • Exercise 23.4-4 Finding the Values of y
  • Exercise 23.4-5 Progressive Rates and Electricity Consumption
  • Exercise 23.4-6 Progressive Rates and Text Messaging Services
  • Exercise 23.5-1 Finding a Leap Year
  • Exercise 23.5-2 Displaying the Days of the Month
  • Exercise 23.5-3 Checking for Proper Capitalization and Punctuation
  • Exercise 23.5-4 Is the Number a Palindrome?
  • 23.6 Boolean Expressions Reference and Handy Tips
  • 23.7 Review Exercises
  • 24.1 What is a Loop Control Structure?
  • 24.2 From Sequence Control to Loop Control Structures
  • 24.3 Review Questions: True/False
  • Exercise 25.1-1 Designing the Flowchart and Counting the Total Number of Iterations
  • Exercise 25.1-2 Counting the Total Number of Iterations
  • Exercise 25.1-3 Counting the Total Number of Iterations
  • Exercise 25.1-4 Counting the Total Number of Iterations
  • Exercise 25.1-5 Finding the Sum of Four Numbers
  • Exercise 25.1-6 Finding the Sum of Odd Numbers
  • Exercise 25.1-7 Finding the Sum of N Numbers
  • Exercise 25.1-8 Finding the Sum of an Unknown Quantity of Numbers
  • Exercise 25.1-9 Finding the Product of 20 Numbers
  • Exercise 25.2-1 Designing the Flowchart and Counting the Total Number of Iterations
  • Exercise 25.2-2 Counting the Total Number of Iterations
  • Exercise 25.2-3 Designing the Flowchart and Counting the Total Number of Iterations
  • Exercise 25.2-4 Counting the Total Number of Iterations
  • Exercise 25.2-5 Finding the Product of N Numbers
  • Exercise 25.3-1 Designing the Flowchart and Counting the Total Number of Iterations
  • 25.4 Review Questions: True/False
  • 25.5 Review Questions: Multiple Choice
  • 25.6 Review Exercises
  • Exercise 26.1-1 Creating the Trace Table
  • Exercise 26.1-2 Creating the Trace Table
  • Exercise 26.1-3 Counting the Total Number of Iterations
  • Exercise 26.1-4 Finding the Sum of Four Numbers
  • Exercise 26.1-5 Finding the Square Roots from 0 to N
  • Exercise 26.1-6 Finding the Sum of 1 + 2 + 3 + … + 100
  • Exercise 26.1-7 Finding the Product of 2 × 4 × 6 × 8 × 10
  • Exercise 26.1-8 Finding the Sum of 22 + 42 + 62 + … (2N)2
  • Exercise 26.1-9 Finding the Sum of 33 + 66 + 99 + … (3N)3N
  • Exercise 26.1-10 Finding the Average Value of Positive Numbers
  • Exercise 26.1-11 Counting the Vowels
  • Exercise 26.2-1 Counting the Total Number of Iterations
  • Exercise 26.2-2 Counting the Total Number of Iterations
  • Exercise 26.2-3 Counting the Total Number of Iterations
  • Exercise 26.2-4 Counting the Total Number of Iterations
  • Exercise 26.2-5 Finding the Sum of N Numbers
  • 26.3 Review Questions: True/False
  • 26.4 Review Questions: Multiple Choice
  • 26.5 Review Exercises
  • Exercise 27.1-1 Say “Hello Zeus”. Counting the Total Number of Iterations.
  • Exercise 27.1-2 Creating the Trace Table
  • Exercise 27.2-1 Violating the First Rule
  • Exercise 27.2-2 Violating the Second Rule
  • 27.3 Review Questions: True/False
  • 27.4 Review Questions: Multiple Choice
  • 27.5 Review Exercises
  • 28.1 Introduction
  • Exercise 28.2-1 Designing the Flowchart Fragment
  • Exercise 28.2-2 Designing the Flowchart Fragment
  • Exercise 28.2-3 Designing the Flowchart
  • Exercise 28.2-4 Designing the Flowchart Fragment
  • Exercise 28.2-5 Designing the Flowchart
  • Exercise 28.3-1 Writing the C++ Program
  • Exercise 28.3-2 Writing the C++ Program
  • Exercise 28.3-3 Writing the C++ Program
  • Exercise 28.3-4 Writing the C++ Program
  • 28.4 Review Exercises
  • 29.1 Introduction
  • 29.2 Choosing a Loop Control Structure
  • 29.3 The “Ultimate” Rule
  • 29.4 Breaking Out of a Loop
  • Exercise 29.5-1 Cleaning Out the Loop
  • Exercise 29.5-2 Cleaning Out the Loop
  • 29.6 Endless Loops and How to Stop Them
  • 29.7 The “From Inner to Outer” Method
  • 29.8 Review Questions: True/False
  • 29.9 Review Questions: Multiple Choice
  • 29.10 Review Exercises
  • Exercise 30.1-1 Counting the Numbers According to Which is Greater
  • Exercise 30.1-2 Counting the Numbers According to Their Digits
  • Exercise 30.1-3 How Many Numbers Fit in a Sum
  • Exercise 30.1-4 Finding the Total Number of Positive Integers
  • Exercise 30.1-5 Iterating as Many Times as the User Wishes
  • Exercise 30.1-6 Finding the Sum of the Digits
  • Exercise 30.2-1 Displaying all Three-Digit Integers that Contain a Given Digit
  • Exercise 30.2-2 Displaying all Instances of a Specified Condition
  • Exercise 30.3-1 Finding Odd and Even Numbers - Validation Without Error Messages
  • Exercise 30.3-2 Finding the Sum of Four Numbers
  • Exercise 30.4-1 Validating and Finding the Minimum and the Maximum Value
  • Exercise 30.4-2 Validating and Finding the Hottest Planet
  • Exercise 30.4-3 ”Making the Grade”
  • Exercise 30.5-1 Calculating the Area of as Many Triangles as the User Wishes
  • Exercise 30.5-2 Finding x and y
  • Exercise 30.5-3 The Russian Multiplication Algorithm
  • Exercise 30.5-4 Finding the Number of Divisors
  • Exercise 30.5-5 Is the Number a Prime?
  • Exercise 30.5-6 Finding all Prime Numbers from 1 to N
  • Exercise 30.5-7 Heron's Square Root
  • Exercise 30.5-8 Calculating π
  • Exercise 30.5-9 Approximating a Real with a Fraction
  • Exercise 30.6-1 Fahrenheit to Kelvin, from 0 to 100
  • Exercise 30.6-2 Rice on a Chessboard
  • Exercise 30.6-3 Just a Poll
  • Exercise 30.6-4 Is the Message a Palindrome?
  • 30.7 Review Questions: True/False
  • 30.8 Review Exercises
  • 31.1 Introduction
  • Exercise 31.2-1 Designing an Array
  • Exercise 31.2-2 Designing Arrays
  • Exercise 31.2-3 Designing Arrays
  • 31.3 Creating One-Dimensional Arrays in C++
  • Exercise 31.4-1 Creating the Trace Table
  • Exercise 31.4-2 Using a Non-Existing Index
  • 31.5 How to Alter the Value of an Array Element
  • Exercise 31.6-1 Finding the Sum
  • Exercise 31.7-1 Displaying Words in Reverse Order
  • Exercise 31.7-2 Displaying Positive Numbers in Reverse Order
  • Exercise 31.7-3 Finding the Average Value
  • Exercise 31.7-4 Displaying Reals Only
  • Exercise 31.7-5 Displaying Elements with Odd-Numbered Indexes
  • Exercise 31.7-6 Displaying Even Numbers in Odd–Numbered Index Positions
  • 31.8 What is a Map?
  • 31.9 Creating Unordered Maps in C++
  • Exercise 31.10-1 Roman Numerals to Numbers
  • Exercise 31.10-2 Using a Non-Existing Key in Unordered Maps
  • Exercise 31.11-1 Assigning a Value to a Non-Existing Key
  • 31.12 How to Iterate Through a Map
  • 31.13 Review Questions: True/False
  • 31.14 Review Questions: Multiple Choice
  • 31.15 Review Exercises
  • 32.1 Creating Two-Dimensional Arrays in C++
  • Exercise 32.2-1 Creating the Trace Table
  • 32.3 How to Iterate Through a Two-Dimensional Array
  • Exercise 32.4-1 Displaying Reals Only
  • Exercise 32.4-2 Displaying Odd Columns Only
  • 32.5 What's the Story on Variables i and j?
  • Exercise 32.6-1 Finding the Sum of the Elements on the Main Diagonal
  • Exercise 32.6-2 Finding the Sum of the Elements on the Antidiagonal
  • Exercise 32.6-3 Filling in the Array
  • 32.7 Review Questions: True/False
  • 32.8 Review Questions: Multiple Choice
  • 32.9 Review Exercises
  • 33.1 Introduction
  • Exercise 33.2-1 Finding the Average Value
  • Exercise 33.3-1 Finding the Average Value
  • Exercise 33.4-1 Using Three One-Dimensional Arrays
  • Exercise 33.4-2 Using a One-Dimensional Array Along with a Two-Dimensional Array
  • Exercise 33.4-3 Using an Array Along with an Unordered Map
  • 33.5 Creating a One-Dimensional Array from a Two-Dimensional Array
  • 33.6 Creating a Two-Dimensional Array from a One-Dimensional Array
  • 33.7 Useful Data Structures Functions/Methods (Subprograms)
  • 33.8 Review Questions: True/False
  • 33.9 Review Questions: Multiple Choice
  • 33.10 Review Exercises
  • Exercise 34.1-1 Creating an Array that Contains the Average Values of its Neighboring Elements
  • Exercise 34.1-2 Creating an Array with the Greatest Values
  • Exercise 34.1-3 Merging One-Dimensional Arrays
  • Exercise 34.1-4 Creating Two Arrays – Separating Positive from Negative Values
  • Exercise 34.1-5 Creating an Array with Those who Contain Digit 5
  • Exercise 34.2-1 Displaying Odds in Reverse Order
  • Exercise 34.3-1 Which Depth is the Greatest?
  • Exercise 34.3-2 Which Lake is the Deepest?
  • Exercise 34.3-3 Which Lake, in Which Country, Having Which Average Area, is the Deepest?
  • Exercise 34.3-4 Which Students Have got the Greatest Grade?
  • Exercise 34.3-5 Finding the Minimum Value of a Two-Dimensional Array
  • Exercise 34.3-6 Finding the City with the Coldest Day
  • Exercise 34.3-7 Finding the Minimum and the Maximum Value of Each Row
  • Exercise 34.4-1 The Bubble Sort Algorithm – Sorting One-Dimensional Arrays with Numeric Values
  • Exercise 34.4-2 Sorting One-Dimensional Arrays with Alphanumeric Values
  • Exercise 34.4-3 Sorting One-Dimensional Arrays While Preserving the Relationship with a Second Array
  • Exercise 34.4-4 Sorting Last and First Names
  • Exercise 34.4-5 Sorting a Two-Dimensional Array
  • Exercise 34.4-6 The Modified Bubble Sort Algorithm – Sorting One-Dimensional Arrays
  • Exercise 34.4-7 The Selection Sort Algorithm – Sorting One-Dimensional Arrays
  • Exercise 34.4-8 Sorting One-Dimensional Arrays While Preserving the Relationship with a Second Array
  • Exercise 34.4-9 The Insertion Sort Algorithm – Sorting One-Dimensional Arrays
  • Exercise 34.4-10 The Three Worst Elapsed Times
  • Exercise 34.5-1 The Linear Search Algorithm – Searching in a One-Dimensional Array that may Contain the Same Value Multiple Times
  • Exercise 34.5-2 Display the Last Names of All Those People Who Have the Same First Name
  • Exercise 34.5-3 The Linear Search Algorithm – Searching in a Two-Dimensional Array that May Contain the Same Value Multiple Times
  • Exercise 34.5-4 The Linear Search Algorithm – Searching in a One-Dimensional Array that Contains Unique Values
  • Exercise 34.5-5 Searching for a Social Security Number
  • Exercise 34.5-6 The Linear Search Algorithm – Searching in a Two-Dimensional Array that Contains Unique Values
  • Exercise 34.5-7 Checking if a Value Exists in all Columns
  • Exercise 34.5-8 The Binary Search Algorithm – Searching in a Sorted One-Dimensional Array
  • Exercise 34.5-9 Display all the Historical Events for a Country
  • Exercise 34.5-10 Searching in Each Column of a Two-Dimensional Array
  • Exercise 34.6-1 On Which Days was There a Possibility of Snow?
  • Exercise 34.6-2 Was There Any Possibility of Snow?
  • Exercise 34.6-3 In Which Cities was There a Possibility of Snow?
  • Exercise 34.6-4 Display from Highest to Lowest Grades by Student, and in Alphabetical Order
  • Exercise 34.6-5 Archery at the Summer Olympics
  • Exercise 34.6-6 The Five Best Scorers
  • Exercise 34.6-7 Counting the Frequency of Vowels
  • 34.7 Review Questions: True/False
  • 34.8 Review Exercises
  • 35.1 What Exactly is a Subprogram?
  • 35.2 What is Procedural Programming?
  • 35.3 What is Modular Programming?
  • 35.4 Review Questions: True/False
  • 36.1 Subprograms that Return a Value
  • 36.2 How to Make a Call to a Function
  • 36.3 Subprograms that Return no Values
  • 36.4 How to Make a Call to a void Function
  • 36.5 Formal and Actual Arguments
  • Exercise 36.6-1 Back to Basics – Calculating the Sum of Two Numbers
  • Exercise 36.6-2 Calculating the Sum of Two Numbers Using Fewer Lines of Code!
  • Exercise 36.7-1 Back to Basics – Displaying the Absolute Value of a Number
  • 36.8 Review Questions: True/False
  • 36.9 Review Exercises
  • 37.1 Can Two Subprograms use Variables of the Same Name?
  • 37.2 Can a Subprogram Call Another Subprogram?
  • 37.3 Passing Arguments by Value and by Reference
  • 37.4 Passing and/or Returning an Array
  • 37.5 Default Argument Values (Optional Arguments)
  • 37.6 The Scope of a Variable
  • 37.7 Converting Parts of Code into Subprograms
  • 37.8 Recursion
  • 37.9 Review Questions: True/False
  • 37.10 Review Exercises
  • Exercise 38.1-1 A Simple Currency Converter
  • Exercise 38.1-2 Finding the Average Values of Positive Integers
  • Exercise 38.1-3 Finding the Sum of Odd Positive Integers
  • Exercise 38.1-4 Finding the Values of y
  • Exercise 38.2-1 Validating Data Input Using a Subprogram
  • Exercise 38.2-2 Sorting an Array Using a Subprogram
  • Exercise 38.2-3 Progressive Rates and Electricity Consumption
  • Exercise 38.2-4 Roll, Roll, Roll the… Dice!
  • Exercise 38.2-5 How Many Times Does Each Number of the Dice Appear?
  • 38.3 Review Exercises
  • 39.1 What is Object-Oriented Programming?
  • 39.2 Classes and Objects in C++
  • 39.3 The Constructor and the Keyword this
  • Exercise 39.4-1 Historical Events
  • Exercise 39.5-1 The Roman Numerals
  • Exercise 39.6-1 Doing Math
  • 39.7 Class Inheritance
  • 39.8 Review Questions: True/False
  • 39.9 Review Exercises
  • 40.1 Introduction
  • 40.2 Opening a File
  • 40.3 Closing a File
  • 40.4 Writing in (or Appending to) a File
  • 40.5 The File Pointer
  • 40.6 Reading from a File
  • 40.7 Iterating Through the Contents of a File
  • 40.8 Review Questions: True/False
  • 40.9 Review Exercises
  • Exercise 41.1-1 Calculating the Sum of 10 Numbers
  • Exercise 41.1-2 Calculating the Average Value of an Unknown Quantity of Numbers
  • Exercise 41.1-3 Finding Minimum and Maximum Values
  • Exercise 41.1-4 Concatenating Files
  • Exercise 41.1-5 Searching in a File
  • Exercise 41.1-6 Combining Files with Subprograms
  • 41.2 Review Exercises
  • Some Final Words from the Author

Product information

  • Title: C++ and Algorithmic Thinking for the Complete Beginner
  • Author(s): Aristides Bouras
  • Release date: June 2024
  • Publisher(s): Packt Publishing
  • ISBN: 9781836208198

You might also like

C# and algorithmic thinking for the complete beginner.

by Aristides Bouras

Dive into the world of C# and algorithmic thinking with Aristides Bouras's comprehensive guide for complete …

Java and Algorithmic Thinking for the Complete Beginner

Dive into the world of Java and algorithmic thinking with this book. This comprehensive guide for …

C++ Crash Course

by Josh Lospinoso

Upgrade your Code with C++ C++ is one of the most widely used languages for real-world …

The Complete C++ Developer Course

by Codestars By Rob Percival, John P. Baugh

Do you know that C++ is used by over 4 million developers worldwide? In the US, …

Don’t leave empty-handed

Get Mark Richards’s Software Architecture Patterns ebook to better understand how to design components—and how they should interact.

It’s yours, free.

Cover of Software Architecture Patterns

Check it out now on O’Reilly

Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.

algorithmic thinking book review

IMAGES

  1. Book Review

    algorithmic thinking book review

  2. e-Book$ F.r.e.e Algorithmic Thinking: A Problem-Based Introduction Pre

    algorithmic thinking book review

  3. Introduction to Algorithms: A Practical approach to Algorithms

    algorithmic thinking book review

  4. Amazon.com: Thinking in Algorithms: How to Combine Computer Analysis

    algorithmic thinking book review

  5. Book Review

    algorithmic thinking book review

  6. Python and Algorithmic Thinking for the Complete Beginner: Learn to

    algorithmic thinking book review

VIDEO

  1. Computational Thinking in Arabic: Chapter 2.1 Logical and Algorithmic Thinking

  2. Algorithmic thinking|| Computational thinking and algorithms||Chapter 2

  3. Exam Details

  4. Algorithms and Complexity

  5. Does the algorithmic trading ACTUALLY work? Review of the weekly outlook on dollar index

  6. Heaps

COMMENTS

  1. Book Review

    In September 2020, I published a review of Algorithmic Thinking: A Problem-Based Introduction by Daniel Zingaro. This is an update for the forthcoming second edition of the book. Solving Problems With Algorithms Computers are great at evaluating programmers' algorithmic problem-solving skills. Hence the proliferation of online judges used for screening job candidates, running coding contests

  2. Algorithmic Thinking: A Problem-Based Introduction

    Amazon.com: Algorithmic Thinking: A Problem-Based Introduction: 9781718500808: Zingaro, Daniel: Books ... I was recently asked to review this book by the author. The book teaches algorithms based on problems from various programming competitions. It covers a lot of the basic algorithms and data structures you would see in a typical programming ...

  3. Algorithmic Thinking: A Problem-Based Introduction

    37 ratings4 reviews. A hands-on, problem-based introduction to building algorithms and data structures to solve problems with a computer. Algorithmic Thinking will teach you how to solve challenging programming problems and design your own algorithms. Daniel Zingaro, a master teacher, draws his examples from world-class programming competitions ...

  4. Book Review

    Book Review - Algorithmic Thinking: A Problem-Based Introduction. As any student pursuing a technical degree knows, problem sets are a big part of math, physics, and engineering classes. Computer science works a bit differently. While CS theory classes use problem sets similar to those in math and science, other classes often require CS ...

  5. Anyone Can Code: Algorithmic Thinking

    Can Code series: Algorithmic Thinking. We all come up with and use algorithms every day to achieve objectives and solve problems. My approach in this book is primarily based on using common problem-solving approaches and applying them to algorithmic thinking to design programs. I also continue using modularization as a key element.

  6. Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your

    Amazon.com: Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your Coding Skills: 9781718503229: Zingaro, ... —Midwest Book Review. About the Author. Dr. Daniel Zingaro is an award-winning associate professor of mathematical and computational sciences at the University of Toronto Mississauga. He is well known for his uniquely ...

  7. The 2nd Edition of Algorithmic Thinking

    The old book website for the first edition is still available because there are a bunch of blog posts there that I think will still be useful to readers. Three years ago, I published a book called Algorithmic Thinking to help programmers solve challenging problems using algorithms and data structures. My five rules were. No pseudocode allowed ...

  8. Algorithmic Thinking : A Problem-Based Introduction

    Algorithmic Thinking. : Daniel Zingaro. No Starch Press, Dec 15, 2020 - Computers - 408 pages. A hands-on, problem-based introduction to building algorithms and data structures to solve problems with a computer. Algorithmic Thinking will teach you how to solve challenging programming problems and design your own algorithms.

  9. Algorithmic Thinking: A Problem-Based Introduction

    Hello, readers, I'm happy to announce that I've completed a 2nd edition of Algorithmic Thinking. I posted this on LinkedIn but wanted to share with my readers here as well. The TL;DR is that if you're looking for the latest stuff, there's a new book website for Algorithmic Thinking 2nd Edition.

  10. Algorithmic Thinking[Book]

    Title: Algorithmic Thinking. Author (s): Dan Zingaro. Release date: December 2020. Publisher (s): No Starch Press. ISBN: 9781718500808. Algorithmic Thinking will teach you how to solve challenging programming problems and design your own algorithms. Daniel Zingaro, a master teacher, draws his examples from world-class programming competitions ...

  11. Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your

    "Now a fully updated and expanded second edition, Daniel Zingaro's Algorithmic Thinking: Unlock Your Programming Potential from No Starch Press is an ideal, comprehensive, and thoroughly 'user friendly' instructional resource for C Programming Language students and software development professionals alike." —Midwest Book Review

  12. Algorithmic Thinking, 2nd Edition

    Algorithmic Thinking, 2nd Edition. Learn Algorithms to Level Up Your Coding Skills. by Daniel Zingaro. December 2023, 480 pp. ISBN-13: 9781718503229. Print Book and FREE Ebook, $49.99. Ebook (PDF, Mobi, and ePub), $39.99. Add to cart.

  13. Algorithmic Thinking by Daniel Zingaro: 9781718500808

    About Algorithmic Thinking. A hands-on, problem-based introduction to building algorithms and data structures to solve problems with a computer. Algorithmic Thinking will teach you how to solve challenging programming problems and design your own algorithms. Daniel Zingaro, a master teacher, draws his examples from world-class programming competitions like USACO and IOI.

  14. Algorithmic Thinking: A Problem-Based Introduction

    A hands-on, problem-based introduction to building algorithms and data structures to solve problems with a computer. Algorithmic Thinking will teach you how to solve challenging programming problems and design your own algorithms. Daniel Zingaro, a master teacher, draws his examples from world-class programming competitions like USACO and IOI.

  15. Algorithmic Thinking, 2nd Edition[Book]

    Algorithmic Thinking, 2nd Edition. by Daniel Zingaro. Released January 2024. Publisher (s): No Starch Press. ISBN: 9781718503229. Read it now on the O'Reilly learning platform with a 10-day free trial. O'Reilly members get unlimited access to books, live events, courses curated by job role, and more from O'Reilly and nearly 200 top ...

  16. Algorithmic Thinking, 2nd Edition

    About Algorithmic Thinking, 2nd Edition. Get in the game and learn essential computer algorithms by solving competitive programming problems, in the fully revised second edition of the bestselling original. ... —Midwest Book Review. Table Of Contents. Foreword Introduction Acknowledgments Chapter 1: Hash Tables Chapter 2: Trees and Recursion

  17. Book Review: Guide to Competitive Programming

    There's also a lightning-fast review of recursion, and you should be ready for that if you've worked through Chapters 2 and 3 of Algorithmic Thinking. The chapter ends with a summary of bit-manipulation techniques: low-level programming techniques that can be a little opaque but are extremely efficient.

  18. INTRODUCTION

    Get Algorithmic Thinking 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. Start your free trial. INTRODUCTION I'm assuming that you've learned to use a programming language such as C, C++, Java, or Python ...

  19. Algorithmic Thinking, 2nd Edition

    Algorithmic Thinking is the complete package, providing the solid foundation you need to elevate your coding skills to the next level. Reviews "Algorithmic Thinking provides the theoretical background and detailed problem explanations required to stay ahead of our human and robotic competitors."

  20. Algorithmic Thinking : Zingaro, Daniel: Amazon.in: Books

    Algorithmic Thinking. Paperback - 15 December 2020. by Daniel Zingaro (Author) 4.7 90 ratings. See all formats and editions. EMI starts at ₹119. No Cost EMI available EMI options. Save Extra with 3 offers. No Cost EMI: Avail No Cost EMI on select cards for orders above ₹3000 Details.

  21. Amazon.com: Customer reviews: Algorithmic Thinking, 2nd Edition: Learn

    Find helpful customer reviews and review ratings for Algorithmic Thinking, 2nd Edition: Learn Algorithms to Level Up Your Coding Skills at Amazon.com. Read honest and unbiased product reviews from our users. ... brings a wealth of knowledge and practical insight to this book. You will be learning the most important concepts in computer science.

  22. Algorithmic Thinking, 2nd Edition by Daniel Zingaro (ebook)

    Whether you're a student prepping for coding interviews or an independent learner, this book is your essential guide to efficient problem-solving in programming. Learn the intricacies of hash tables, recursion, dynamic programming, trees, graphs, and heaps. Become proficient in choosing and implementing the best solutions for any coding ...

  23. C++ and Algorithmic Thinking for the Complete Beginner

    Author (s): Aristides Bouras. Release date: June 2024. Publisher (s): Packt Publishing. ISBN: 9781836208198. Dive into the essentials of C++ and algorithmic thinking with this book. This comprehensive guide is perfect for newcomers looking to build a strong foundation in programming and problem-solving. Key ….