Jump to ratings and reviews
Rate this book

The CS Detective: An Algorithmic Tale of Crime, Conspiracy, and Computation

Rate this book
Meet Frank Runtime. Disgraced ex-detective. Hard-boiled private eye. Search expert.

When a robbery hits police headquarters, it’s up to Frank Runtime and his extensive search skills to catch the culprits. In this detective story, you’ll learn how to use algorithmic tools to solve the case. Runtime scours smugglers’ boats with binary search, tails spies with a search tree, escapes a prison with depth-first search, and picks locks with priority queues. Joined by know-it-all rookie Officer Notation and inept tag-along Socks, he follows a series of leads in a best-first search that unravels a deep conspiracy. Each chapter introduces a thrilling twist matched with a new algorithmic concept, ending with a technical recap.

Perfect for computer science students and amateur sleuths alike, The CS Detective adds an entertaining twist to learning algorithms.

Follow Frank’s mission and learn:
-The algorithms behind best-first and depth-first search, iterative deepening, parallelizing, binary search, and more
-Basic computational concepts like strings, arrays, stacks, and queues
-How to adapt search algorithms to unusual data structures
-The most efficient algorithms to use in a given situation, and when to apply common-sense heuristic methods

246 pages, Paperback

Published August 16, 2016

24 people are currently reading
453 people want to read

About the author

Jeremy Kubica

6 books15 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
44 (38%)
4 stars
31 (27%)
3 stars
30 (26%)
2 stars
5 (4%)
1 star
3 (2%)
Displaying 1 - 18 of 18 reviews
Profile Image for Martin.
92 reviews67 followers
October 12, 2016
“Don’t take it personally,” said Frank. “I don’t trust anyone.”

What a great introduction to data structures and some of their accompanying algorithms!
The stories in the beginning of each chapter made the technical descriptions really easy to understand.
The overall story was also engaging and, at times, made you want to know what's going to happen next. This way the technical concepts behind each event were much less scary and dry.
Quite surprised for the clarity this book brings into some computer science topics. I hope it gets a sequel.
Profile Image for Jeanne Boyarsky.
Author 29 books76 followers
October 3, 2016
“The CS Detective” is a fun book for learning about algorithms and performance. It's not language specific and it is easy to read. The book uses a story to tie together the algorithms. The story is about a detective who needs to find out who stole documents. It's actually a good story.

The analogies while introducing the algorithms are very well thought out. I like the actual maze for back tracking and the array cart for transporting animals. There are fun references sprinkled throughout like the Brazen Booleans – want to guess that type of answers they give? And the Port of USB. There were also some references that are nice for parents reading this with a child (Intro to Turtle Graphics). The detective meets some fun characters like a wizard.

While I knew most of what was in the book, I hadn't learned (or had forgotten) about iterative deepening so I learned something new.

I read this book so I could recommend it to teenagers starting out with algorithms. It definitely fit the bill. I think adults would enjoy it as well. It's like Head First – fun to read and easy to retain the info. Then there's the interest to go read a harder book. The first half of this book is provided online by the publisher so you can decide for yourself if you like the style.

Disclosure: I received a review copy of this book from the publisher for reviewing it on behalf of CodeRanch.
Profile Image for Dr. Dima.
112 reviews8 followers
June 14, 2021
This book is definitely one of my favourite introductions into computational algorithms, search problems, and data structures. These are intelligently intertwined with an entertaining detective story, in which computational thinking tools are used to follow leads and solve the case. Examples of algorithms and data structures used in this detective novel include linear search, binary search, backtracking, breadth-first search, depth-first search, arrays, queues, heaps, and many others. ⁣

In my opinion, the book is very well-written and engaging. Algorithms and concepts are clearly explained and blend nicely with the flow and plot of the novel without overwhelming the reader with any technical programming language (such as python, java, C++, etc).⁣

The book does not just wrap algorithms and data structures inside an engaging novel, the book also teaches an intelligent approach to problem-solving using computational thinking processes. I strongly recommend it to young and adult readers interested in an accessible and entertaining “algorithmic tale of computation”.⁣
Profile Image for Laura.
107 reviews3 followers
April 14, 2017
I have read all the books of Jeremy Kubica and I really liked this one. I think that, partly due to the explanations at the end of each chapter, it explains the different algorithms in a fun and clear way. The story and the learning material go really good together. It helped me to refresh my knowledge on search algorithms as well as it gave me new insights on how to explain them to laymen. And it did all that in a good detective story! :)
2,783 reviews44 followers
December 24, 2016
This book is different in the sense that it is an unusual combination of what is performed on modern computers with a low technology society with wizards and effective spells. The primary character is Frank Runtime and in a widely used plot device, he is a disgraced former police detective that is now a hardened, cynical private investigator. There is a robbery at police headquarters and Runtime is recruited to hunt the perpetrator(s) down. It is another case where he can do things that are forbidden to the police.
As the investigation continues, there are regular interludes where the algorithmic tactics employed by Runtime are explained to the reader. Most of the algorithms are search algorithms and some examples are breadth-first search, backtracking and binary search. While the explanations are thorough enough to advance the plot of a detective novel, they are not enough to be part of an in-depth education program. There is no mathematics that will be over the head of any reader.
The use of a society where technology is roughly at the middle of the eighteenth century and active magic is practiced is an amusing and unique tactic for detective stories. Therefore, that aspect makes the story entertaining, worthy of reading by people with little to no interest in learning algorithms.
Profile Image for Venkatesh-Prasad.
223 reviews
May 11, 2020
A nice introduction to basic search algorithms and data structures. As the title suggests, the information is weaved into a fiction to make the information more accessible to young adults and kids. However, I am not sure this weaving serves the purpose cos' the book did not trigger the interest of some of the kids that I know.

As for the content, the treatment of the algorithms and data structures that are covered is good for an introductory level. Quite a few pictures along with walk-throughs and no math. Easy to grasp. Also, it can be a quick read.

This could excite some kids about algorithms and data structures.
Profile Image for Gustav Bertram.
34 reviews9 followers
September 23, 2017
A very general introduction to algorithmic thinking, wrapped in an entertaining story.

Discusses some popular search algorithms, and basic data structures. Also has some interesting discussion about algorithms exploiting structure inherent in the data, pairing data structures to the algorithms, and adapting algorithms.
Profile Image for Tiffany.
1,153 reviews
June 22, 2020
I picked up this book because I thought it might be helpful to use with my elementary kids. It would be over their heads. The story was cheesy, at best. Obviously, it was a bit forced to cover the different search strategies in programming. However, I do feel like I learned more about search strategies. Weird combination.
Profile Image for Tassos.
128 reviews6 followers
October 11, 2017
Very informative, I strongly recommend it to anyone (especially youngsters) who wants to get a feeling on search algorithms
Profile Image for Bernardo.
9 reviews2 followers
December 27, 2018
Pretty good book that gives some insight into some of the (in my opinion) most boring concepts to learn.
Profile Image for Jonathon Jones.
124 reviews3 followers
July 5, 2019
This was a fun way to learn about these algorithms, although eventually I didn't care that much about the story anymore.
1 review1 follower
March 17, 2020
Excellent book that both entertains and educates. Mind it is not an extremely in-depth and advanced book, however it brings a fresh way of thinking for problems.
Profile Image for Jeff.
431 reviews4 followers
March 25, 2021
A very nerdy detective novel that is actually teaching algorithmic thinking. I loved it. And, it read like a fairly normal, but simplistic detective novel.
22 reviews1 follower
January 22, 2019
Good book that helps explain how to approach problems with computational thinking.
Profile Image for Andrew Rangel.
56 reviews2 followers
November 26, 2018
This book is great for anyone whom is interested in learning more about Computer Science ideals and foundational aspects. It's a quick read, and if anything I was left wanting more about CS in this format. I highly recommend it to people ages 10 - 16 who have some interest in learning programing or thinking about choosing that as a field of study.
Profile Image for John.
30 reviews5 followers
November 20, 2016
This book does a great job of humorously yet accurately describing data structures and searches in human terms. Obviously not a substitute for any kind of textbook, but a really fun read for anyone that has taken or is taking a data structures course. Appropriate for high school and above.
Displaying 1 - 18 of 18 reviews

Can't find what you're looking for?

Get help and learn more about the design.