Book description
When it comes to writing efficient code, every software professional needs to have an effective working knowledge of algorithms. In this practical book, author George Heineman (Algorithms in a Nutshell) provides concise and informative descriptions of key algorithms that improve coding in multiple languages. Software developers, testers, and maintainers will discover how algorithms solve computational problems creatively.
Each chapter builds on earlier chapters through eye-catching visuals and a steady rollout of essential concepts, including an algorithm analysis to classify the performance of every algorithm presented in the book. At the end of each chapter, youâ??ll get to apply what youâ??ve learned to a novel challenge problemâ??simulating the experience you might find in a technical code interview.
With this book, you will:
- Examine fundamental algorithms central to computer science and software engineering
- Learn common strategies for efficient problem solvingâ??such as divide and conquer, dynamic programming, and greedy approaches
- Analyze code to evaluate time complexity using big O notation
- Use existing Python libraries and data structures to solve problems using algorithms
- Understand the main steps of important algorithms
Table of contents
- Foreword
- Preface
- 1. Problem Solving
-
2. Analyzing Algorithms
- Using Empirical Models to Predict Performance
- Multiplication Can Be Faster
- Performance Classes
- Asymptotic Analysis
- Counting All Operations
- Counting All Bytes
- When One Door Closes, Another One Opens
- Binary Array Search
- Almost as Easy as Ï
- Two Birds with One Stone
- Pulling It All Together
- Curve Fitting Versus Lower and Upper Bounds
- Summary
- Challenge Exercises
-
3. Better Living Through Better Hashing
- Associating Values with Keys
- Hash Functions and Hash Codes
- A Hashtable Structure for (Key, Value) Pairs
- Detecting and Resolving Collisions with Linear Probing
- Separate Chaining with Linked Lists
- Removing an Entry from a Linked List
- Evaluation
- Growing Hashtables
- Analyzing the Performance of Dynamic Hashtables
- Perfect Hashing
- Iterate Over (key, value) Pairs
- Summary
- Challenge Exercises
- 4. Heaping It On
- 5. Sorting Without a Hat
-
6. Binary Trees: Infinity in the
Palm of Your Hand
- Getting Started
- Binary Search Trees
- Searching for Values in a Binary Search Tree
- Removing Values from a Binary Search Tree
- Traversing a Binary Tree
- Analyzing Performance of Binary Search Trees
- Self-Balancing Binary Trees
- Analyzing Performance of Self-Balancing Trees
- Using Binary Tree as (key, value) Symbol Table
- Using the Binary Tree as a Priority Queue
- Summary
- Challenge Exercises
- 7. Graphs: Only Connect!
- 8. Wrapping It Up
- Index
- About the Author
Product information
- Title: Learning Algorithms
- Author(s):
- Release date: July 2021
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781492091011
You might also like
video
Python Fundamentals
51+ hours of video instruction. Overview The professional programmer’s Deitel® video guide to Python development with …
book
Clean Code: A Handbook of Agile Software Craftsmanship
Even bad code can function. But if code isn't clean, it can bring a development organization …
book
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
book
Building Event-Driven Microservices
Organizations today often struggle to balance business requirements with ever-increasing volumes of data. Additionally, the demand …