Volver al ranking

liyin2015/python-coding-interview

TeX

A middle-to-high level open source algorithm book designed with coding interview at heart!

leetcodealgorithmsalgorithms-and-data-structurespythoncoding-interviewsalgorithms-explainedleetcode-problem-catalogbook-seriesleetcode-algorithmstreecomputer-sciencedata-structures
Crecimiento de estrellas
Estrellas
2.3k
Forks
472
Crecimiento semanal
Issues
4
1k2k
ene 2019jul 2021ene 2024jul 2026
README

Hands-on Algorithmic Problem Solving

A 100% open source one-stop coding interview prep book!


DSA · Python · LeetCode · Principles · Problem patterns


   
🔥  Among the top DSA repositories on GitHub


Contributing

The book is written in latex, and all contents except the code is located under Easy-Book folder. Feel free to send me pull requests to contribute contents. Before you start to improve the contents, it would be helpful to know the high-level structure of the book. Read How to contribute? for more details.

All contributors (with decent amount of contributions) will be listed as authors in the project.


About this book

book_structure

In short, this is a middle-to-high level algorithm book designed with cracking coding interviews at hearts. It offers a one-stop coding interview prep experience. The structure of the book:

  • Preparation: introduce the global picture of algorithmic problem solving and coding interviews, learn abstract data structures and highly related and useful math such as recurrence relation, and hands-on Python practice by relating the abstract data structures to Python data structures. Coding is not just code after all.,
  • Principles: we organize the design and principle here so that readers can use them as guidance while not seeking for peculiar algorithm for solving a problem.
  • Classical algorithms: We enhance our algorithm database via learning how to apply the core principles to a variety of classical problems. A database that we can quickly relate to when seeing problems.
  • Coding interview problem patterns: We close our book with the analyzing and categorizing problems by patterns. We address classical and best solutions for each problem pattern.

Besides trying to make the content easy to follow, here summarizes the uniqueness of this book: (1) it offers Python source code that is tailored to be simple so that it would be natural for you to use in interviews (2) all the exercises and examples are from Leetcode problems so that you get to practise online (3) Classical algorithms are explained with design principles. No algorithm is magic. (Check out advanced graph algorithms as an example) (4) problem patterns to help you tackle coding interview questions topic by topic.


How did I come up with this book?

Preparing for the coding interview is not easy! Cracking the coding interview? Nearly impossible for most of us! Luck does play a role in the outcome. So, let's just treat it as a learning process and have some fun!

Computer Science is really not just computer science. It is a combination of all fields; our normal interview problems fall into the enumerative combinatorics and our computer vision mostly consists of Linear Algebra. What really matters is our passion to learn and the ability to apply this knowledge to solve real-life problems.

There are plenty of books out there focusing on either teaching algorithmic knowledge (Introduction to Algorithms, Algorithmic Problem Solving, etc) or introducing the interview process and solving interview problems(Cracking the Coding Interview, Coding Interview Questions, etc), but none of these books truly combine the two. This is a book designed to make up this role in the categorization. Principle, Pattern, and Leetcode Problems make up the core of this book.

This is NOT a book that provides hiring statistics for each company or gives the reader quick tricks in order to pass a few coding interviews. Its purpose is to show you the beauty of algorithmic problem solving in the hope that you will be more passionate and confident about software engineering; the interview questions just set up a playground where we strengthen what we learn.


For Readers

The whole book is compiled as pdf.

For readers, you can read the book as a whole or read chapters selectively following the below links.

Table of Contents


Warm Up: Abstract Data Structures and Tools

Get Started: Programming and Python Data Structures

Core Principles: Algorithm Design and Analysis

Advanced Algorithms

Problem Patterns

  • Dynamic Programming Questions (15%)
  • Array Questions (15%)
  • Linked List, Stack, Queue, and Heap Questions (12%)
  • String Questions (15%)
  • Tree Questions (10%)
  • Graph Questions (15%)

Note: everything is still in progress, so use it with caution.


Referring Books and Materials

  • Skiena, Steven S. The algorithm design manual: Text. Vol. 1. Springer Science & Business Media, 1998.

  • T. H. Cormen, Introduction to algorithms, MIT press, 2009.

  • Manber, Udi. Introduction to algorithms: a creative approach. Addison-Wesley Longman Publishing Co., Inc., 1989.

  • Kleinberg, Jon, and Eva Tardos. Algorithm design. Pearson Education India, 2006.

  • Russell, Stuart J., and Peter Norvig. Artificial intelligence: a modern approach. Malaysia; Pearson Education Limited,, 2016. (Best book ever in explaining searching problem-solving, differentiate tree-search and graph-search)

  • D. M. Beazley, Python essential reference, Addison-Wesley Professional,2009.

  • S. Halim and F. Halim, Competitive Programming 3, Lulu Independent Publish, 2013.

  • B. Slatkin, Effective Python: 59 Specific Ways to Write Better Python,Pearson Education, 2015.

  • H. hua jiang, “Leetcode blogs,” https://zxi.mytechroad.com/blog/category, 2018, [Online; accessed 19-July-2018].

  • B. Baka, “Python data structures and algorithms: Improve application performance with graphs, stacks, and queues,” 2017.

  • “Competitive Programming,”https://cp-algorithms.com/, 2019, [Online; accessed 19-July-2018].

  • “cs princeton,”https://aofa.cs.princeton.edu/60trees/, 2019, [Online; accessed 19-July-2018]

  • https://stanford-cs161.github.io/winter2021/schedule/


Tools


Mocking Interviews

Practice is important. Schedule some mocking interviews with interviewing.io. If you cant manage to register, you can join us in discord server and ask peers for practice interview.


Community

Join me on discord server: https://discord.gg/ZXnSag7fMP, for a supportive community


Feedback

If you have ideas to improve the book, about formatting, more contents, or correct the errors, do not hesitate to let me know.

To cite this content, please use:


```bibtex @misc{handsondsa, author = {Li Yin}, title = {Hands-on Algorithmic Problem Solving}, howpublished = {\url{https://github.com/liyin2015/python-coding-interview/}}, year = {2021} } ```
Repositorios relacionados
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

algorithmleetcode
cyc2018.xyz
184.8k50.8k
labuladong/fucking-algorithm

Crack LeetCode, not only how, but also why.

Markdownleetcodealgorithms
labuladong.online
134.9k23.6k
krahets/hello-algo

《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持简中、繁中、English、日本語,提供 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 等代码实现

JavaMavenOtheralgorithmsdata-structures
hello-algo.com
128.6k15.3k
MisterBooo/LeetCodeAnimation

Demonstrate all the questions on LeetCode in the form of animation.(用动画的形式呈现解LeetCode题目的思路,完整单步/回看/变速/语音讲解在 algomooc.com)

JavaMavenleetcodeleetcode-solutions
algomooc.com
76.6k13.9k
kdn251/interviews

Everything you need to know to get the job.

JavaMavenMIT Licensejavainterview
youtube.com/channel/UCKvwPt6BifPP54yzH99ff1g
65.1k12.9k
youngyangyang04/leetcode-master

《代码随想录》LeetCode 刷题攻略:200道经典题目刷题顺序,共60w字的详细图解,视频难点剖析,50余张思维导图,支持C++,Java,Python,Go,JavaScript等多语言版本,从此算法学习不再迷茫!🔥🔥 来看看,你会发现相见恨晚!🚀

Shellleetcodeprogrammer
62k12.3k
azl397985856/leetcode

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

JavaScriptnpmOtheralgorithmleetcode
leetcode-solution-leetcode-pp.gitbook.io/leetcode-solution/
55.8k9.4k
huihut/interview

📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

C++Otherinterviewinterview-questions
interview.huihut.com
38.1k8.1k
doocs/leetcode

🔥LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解

JavaMavenCreative Commons Attribution Share Alike 4.0 Internationalalgorithmscpp
leetcode.doocs.org
36.3k9.4k
geekxh/hello-algorithm

🌍 针对小白的算法训练 | 包括四部分:①.大厂面经 ②.力扣图解 ③.千本开源电子书 ④.百张技术思维导图(项目花了上百小时,希望可以点 star 支持,🌹感谢~)推荐免费ChatGPT使用网站

JavaMavenalgorithmsinterview-questions
lintcode.com/chat-gpt
36.1k6.4k
halfrost/LeetCode-Go

✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% | LeetCode 题解

GoGo ModulesMIT Licenseleetcodegolang
books.halfrost.com/leetcode
33.8k5.7k
kunal-kushwaha/DSA-Bootcamp-Java

This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs.

JavaMavenjavainterview-preparation
youtube.com/playlist
23.2k13.4k