40 Algorithms Every Programmer Should Know Get to grips with writing algorithms with the help of case studies and their implementation in Python

Imran Ahmad



A concise guide to algorithms that will help you solve classical computer science problems using everything from fundamental algorithms like sorting and searching to modern algorithms used in machine learning and cryptography

Key Features

  • Learn the techniques you need to know to design algorithms for solving complex problems
  • Get familiar with neural network and deep learning techniques
  • Explore different types of algorithms and choose the right data structures for their optimal implementation

Book Description

Algorithms have always played an important role both in the science and practice of computing. Beyond traditional computing, the ability to use algorithms to solve real-world problems is an important skill that any developer or programmer must have. This book tries to achieve a balance between helping you develop the skill to select and use an algorithm for solving real-world problems and explaining the logic behind it.

You'll start by learning the fundamentals of algorithms and discover various algorithm design techniques, before exploring how to implement different types of algorithms such as searching, sorting, and dynamic with the help of practical examples. Next, you'll move on to a more complex set of algorithms and learn about linear programming, page ranking, and graphs. Later, you'll go through machine learning algorithms, understanding the math and logic behind them. Further on, you'll learn to use interesting case studies such as weather prediction, tweet clustering, and movie recommendation engines to apply these algorithms optimally. Finally, you'll become well-versed with techniques to enable parallel processing giving you the ability to use these algorithms for compute-intensive tasks.

By the end of this book, you will have become adept at solving real-world computational problems by using a wide range of algorithms.

What you will learn

  • Use existing data structures and algorithms found in Python libraries
  • Get to grips with fraud detection using network analysis with the help of graph algorithms
  • Use machine learning algorithms to cluster similar tweets together and process twitter data in real-time
  • Predict the weather using supervised learning algorithms
  • Use neural networks for object detection
  • Create a recommendation engine to recommend movies to subscribers
  • Use symmetric and asymmetric encryption on Google Cloud Platform(GCP)to implement fool-proof security

Who This Book Is For

This book is for anyone who wants to understand essential algorithms and their implementation. Whether you are an experienced programmer who wants to gain a deeper understanding of the math behind the algorithms, or have limited data science and programming knowledge and want to learn more about this important area of active research and application, you'll find this book useful. Although experience with Python programming is a must, knowledge of data science will be helpful but not necessary.



- 學習設計算法以解決複雜問題所需的技巧
- 熟悉神經網絡和深度學習技術
- 探索不同類型的算法,並選擇最佳數據結構進行實現




- 使用Python庫中現有的數據結構和算法
- 使用圖形算法進行網絡分析,實現欺詐檢測
- 使用機器學習算法將相似的推文聚類在一起,並實時處理Twitter數據
- 使用監督學習算法預測天氣
- 使用神經網絡進行物體檢測
- 創建一個推薦引擎,為訂閱者推薦電影
- 在Google Cloud Platform(GCP)上使用對稱和非對稱加密實現安全性



Imran Ahmad

Imran is a certified Google Instructor and has been teaching for Google and Learning Tree for the last many years. The topics Imran teaches include Python, Machine Learning, Algorithms, Big Data and Deep Learning. Imran is a part of cutting-edge research on Machine Learning and Algorithms for the last many years. In his PhD, he proposed a new linear programming based algorithm called ATSRA , which can be used to optimally assign resources in a cloud computing environment. For the last four years, Imran is working in a high-profile Machine Learning project at the Advanced Analytics Lab of Canadian Federal Government. The project is to develop machine learning algorithms that can automate the process of immigration. Imran is also a visiting professor at Carleton University. Imran has written many conference and journal papers and a couple of his Journal papers have recently won the best paper awards. Imran also regularly writes blogs on selected IT topics. He is currently working on developing algorithms to optimally use GPUs to train complex machine learning models.


Imran Ahmad

Imran Ahmad是一位經過認證的Google講師,並在過去多年間為Google和Learning Tree進行教學。Imran所教授的主題包括Python、機器學習、演算法、大數據和深度學習。Imran多年來一直參與尖端的機器學習和演算法研究。在他的博士學位中,他提出了一種基於線性規劃的新演算法,稱為ATSRA,可用於在雲計算環境中最佳地分配資源。在過去的四年中,Imran在加拿大聯邦政府的高級分析實驗室從事一個重要的機器學習項目。該項目的目標是開發能夠自動化移民流程的機器學習演算法。Imran還是卡爾頓大學的客座教授。Imran撰寫了許多會議和期刊論文,其中幾篇期刊論文最近獲得了最佳論文獎。Imran還定期撰寫有關選定IT主題的部落格文章。他目前正在開發能夠最佳地使用GPU來訓練複雜機器學習模型的演算法。