Algorithms: Absolute Beginner's Guide

Author: Kirupa Chinnathambi
Publisher: Addison-Wesley
Date: November 2023
Pages: 416
ISBN: 978-0138222291
Print: 0138222290
Kindle: B0CCTZ37DQ
Audience: General
Rating: 4.5
Reviewer: Kay Ewbank

Subtitled 'a practical introduction to data structures and algorithms in JavaScript', this book is split into two parts; firstly, data structures, then algorithms.

Kirupa Chinnathambi has an easy going writing style and explains ideas well using good analogies. He has a popular blog on programming, and works at Microsoft on the Visual Studio team.

The book opens with a chapter introducing the need for data structures, followed by individual chapters on each of the data structures in more detail.

Banner

Interestingly, Chinnathambi's first detailed chapter is about big-O notation and complexity analysis, the title of which I think would scare off many of the potential readers of the book. The explanation (big-O as a mathematical way to express the worst case scenario of how well code runs) is fine and understandable, and the reasoning seems to be that Chinnathambi uses the notation to analyze and compare the different algorithms. It just seems a bit complex as an opener.

Having dived into big-O notation, the next chapter introduces the concept of arrays as implemented in JavaScript. A chapter on linked lists is next, with examples of setting up and using singly, doubly and circular linked lists.

Stacks and queues each get a chapter. The chapter on stacks considers the runtime performance of different stack operators - push, pop, peak and search, as does the chapter on queues for enqueue, dequeue and peek. As with other chapters, there are examples of how to implement and use the structures in JavaScript code.

 

Most of the rest of Part 1 of the book is a series of chapters about different types of trees, from the basic tree through binary trees, binary search trees, heaps and prefix trees. There are also chapters on hashtables and graphs, which you may think of as specific types of tree structures depending on your viewpoint.

Part 2 moves on to algorithms, and again Chinnathambi shows an interesting way of thinking by starting with an introduction to recursion. This is introduced as a technique that allows developers to break down large, complicated problems into smaller, more manageable pieces, with the advantage of helping improve logical thinking and problem solving skills. Basic recursion is followed by a chapter on Fibonacci and going beyond recursion.

Other chapters in this part of the book examine well known algorithms including Towers of Hanoi, linear search, binary search, depth and breadth first searches. Interestingly, Quicksort comes before bubble sort in the list of chapters, and is followed by insertion sort, selection sort and merge sort.

Overall, I enjoyed this book. The author writes well and keeps the material interesting with good examples. I didn't agree with all his decisions about how and when to introduce topics, but anybody reading the book would gain a useful overview of some of the key algorithms and their usefulness.

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


TinyML: Machine Learning with TensorFlow Lite

Authors: Pete Warden and Daniel Situnayake
Publisher: O'Reilly
Date: December 2019
Pages: 504
ISBN: 978-1492052043
Print: 1492052043
Kindle: B082TY3SX7
Audience: Developers interested in machine learning
Rating: 5, but see reservations
Reviewer: Harry Fairhead
Can such small machines really do ML?



Accelerating Software Quality

Author: Eran Kinsbruner
Publisher: Perforce
Pages: 357
ISBN: 978-8671126044
Print: B08FKW8B9B
Kindle:B08FKWD2TR
Audience: Devops developers
Rating: 3
Reviewer: Kay Ewbank

With a subtitle of 'machine learning and artificial intelligence in the age of devops', this book certainly sounds as though it fits c [ ... ]


More Reviews