Computer Science Textbooks: The Best Free and Classic Books for Every Core CS Course (2027 Edition)
A course-by-course map of the best computer science textbooks, free and classic, for every core subject in a CS degree: programming, discrete math, data structures and algorithms, computer architecture, operating systems, networks, databases, compilers, theory of computation, distributed systems, security and more. For each course you get the classic textbook universities assign, the best free CS textbook alternative (legally free from the author or publisher), and a free lecture series to pair it with. Use it to self-study a full computer science curriculum or to find a better explanation for the course you are taking right now.
Last reviewed: December 2026. Free books are linked only to official sources (authors, universities, publishers, open-access sites). Paid books are marked 💲. Prices and editions change; check the publisher before buying.
Table of Contents
- How This List Works
- The Core Curriculum at a Glance
- Self-Study Roadmap (about 2 to 3 years part time)
- 1. Introduction to Programming
- 2. Discrete Mathematics for CS
- 3. Data Structures
- 4. Algorithms
- 5. Computer Systems and Architecture
- 6. Operating Systems
- 7. Computer Networks
- 8. Databases
- 9. Compilers and Interpreters
- 10. Programming Languages
- 11. Theory of Computation and Complexity
- 12. Distributed Systems
- 13. Security and Cryptography
- 14. Artificial Intelligence and Machine Learning
- 15. Computer Graphics
- 16. Software Engineering
- 17. Electives Worth Knowing
- How to Read a CS Textbook Efficiently
- Comparison: Free vs Classic Textbook per Course
- Projects That Prove You Learned It
- Curricula and Guides This List Builds On
- FAQ
- Where to Go Next
- Contributing
- License
How This List Works
For every course you get three things:
| Column | Meaning |
|---|---|
| Classic | The book most universities assign. Often paid (💲). Worth knowing by name, worth buying used. |
| Best free ⭐ | The strongest legally free textbook for the same course. |
| Pair with | A free lecture series or course that follows a similar syllabus. |
Formats: HTML (online), PDF, Interactive. Levels: Intro, Core, Advanced.
The rule for “free”: the author, university or publisher distributes it at no cost. No scanned copies, no “free PDF” sites.
The Core Curriculum at a Glance
| # | Course | Best free textbook | Classic (often paid) | Free lectures |
|---|---|---|---|---|
| 1 | Intro programming | Structure and Interpretation of Computer Programs / How to Design Programs | SICP (MIT Press) | CS50 |
| 2 | Discrete math | Mathematics for Computer Science | 💲 Rosen, Discrete Mathematics and Its Applications | MIT 6.042J |
| 3 | Data structures | Open Data Structures | 💲 Goodrich et al., Data Structures and Algorithms in Java/Python | MIT 6.006 |
| 4 | Algorithms | Algorithms (Erickson) | 💲 CLRS, Introduction to Algorithms | MIT 6.046J |
| 5 | Systems / architecture | Dive into Systems | 💲 Computer Systems: A Programmer’s Perspective | CMU 15-213 materials |
| 6 | Operating systems | Operating Systems: Three Easy Pieces | 💲 Operating System Concepts | MIT 6.1810 (xv6) |
| 7 | Networks | Computer Networks: A Systems Approach | 💲 Computer Networking: A Top-Down Approach | Stanford CS144 |
| 8 | Databases | Readings in Database Systems + CMU lectures | 💲 Database System Concepts | CMU 15-445 |
| 9 | Compilers | Crafting Interpreters | 💲 “Dragon Book”, Compilers: Principles, Techniques, and Tools | Stanford CS143 materials |
| 10 | Programming languages | Programming Languages: Application and Interpretation | 💲 Types and Programming Languages | Software Foundations |
| 11 | Theory of computation | Introduction to Theoretical Computer Science | 💲 Sipser, Introduction to the Theory of Computation | MIT 18.404J |
| 12 | Distributed systems | Distributed Systems (van Steen and Tanenbaum) | 💲 Designing Data-Intensive Applications | MIT 6.5840 |
| 13 | Security / crypto | Security Engineering / A Graduate Course in Applied Cryptography | 💲 Serious Cryptography | MIT 6.858 / 6.5660 |
| 14 | AI / ML | Probabilistic Machine Learning / Dive into Deep Learning | 💲 Russell and Norvig, Artificial Intelligence: A Modern Approach | CS50 AI |
| 15 | Graphics | Physically Based Rendering / Computer Graphics from Scratch | 💲 Fundamentals of Computer Graphics | Learn OpenGL |
| 16 | Software engineering | Software Engineering at Google | 💲 Code Complete | MIT 6.031 readings |
Self-Study Roadmap (about 2 to 3 years part time)
Assumes 10 to 15 hours a week. Each stage lists the book and roughly how long it takes to finish with exercises.
| Stage | Duration | Courses | Books |
|---|---|---|---|
| Year 1, first half | 6 months | Programming, discrete math | SICP or HtDP; Mathematics for Computer Science |
| Year 1, second half | 6 months | Data structures and algorithms | Open Data Structures; Erickson’s Algorithms |
| Year 2, first half | 6 months | Systems, OS | Dive into Systems (or CS:APP); OSTEP |
| Year 2, second half | 6 months | Networks, databases | Computer Networks: A Systems Approach; CMU 15-445 + Red Book |
| Year 3 | 6 to 12 months | Compilers, theory, distributed systems, one elective | Crafting Interpreters; Intro to TCS; van Steen; your elective |
Rules of thumb:
- Do the labs. OS, networks, databases and compilers are learned by building, not reading. Every pairing above has free labs.
- Run two tracks in parallel: one “theory” book (math, algorithms, TCS) and one “building” book (systems, compilers).
- Use Teach Yourself Computer Science as a sanity check; it recommends many of the same books.
1. Introduction to Programming
The goal of a first course is not a language; it is learning to decompose problems, build abstractions and test them.
- ⭐ Structure and Interpretation of Computer Programs, 2nd edition, Harold Abelson and Gerald Jay Sussman.
Intro/CoreHTML(free from MIT Press, CC BY-SA). The legendary MIT text, in Scheme. Best for: motivated learners who want deep ideas about abstraction, recursion and interpreters. - SICP, JavaScript edition, adapted by Martin Henz and Tobias Wrigstad.
Intro/CoreHTMLInteractive. The same book translated to JavaScript, runnable in the browser. - ⭐ How to Design Programs, 2nd edition, Felleisen, Findler, Flatt, Krishnamurthi.
IntroHTML. A systematic “design recipe” for writing programs, in Racket. Best for: true beginners; gentler than SICP. - Composing Programs, John DeNero.
IntroHTML. SICP’s ideas in Python; the text for Berkeley’s CS 61A. - Think Python, 3rd edition, Allen B. Downey.
IntroNotebooks. A clear first Python book, free online. - 💲 Classic: SICP in print (MIT Press) and The C Programming Language (Kernighan and Ritchie).
- Pair with: Harvard CS50x (free) or Berkeley CS 61A.
2. Discrete Mathematics for CS
- ⭐ Mathematics for Computer Science, Lehman, Leighton, Meyer.
CorePDF. Proofs, induction, number theory, graphs, counting, discrete probability. - Discrete Mathematics: An Open Introduction, Oscar Levin.
IntroHTML/PDF. Gentler alternative with interactive exercises. - Foundations of Computer Science, Alfred Aho and Jeffrey Ullman.
IntroPDF. Discrete math taught via data structures and C. - Book of Proof, Richard Hammack.
IntroPDF. If proofs are new to you, start here. - 💲 Classic: Discrete Mathematics and Its Applications (Rosen); Concrete Mathematics (Graham, Knuth, Patashnik).
- Pair with: MIT 6.042J (OCW).
- For a deeper list of free math books see free-math-textbooks.
3. Data Structures
- ⭐ Open Data Structures, Pat Morin.
CoreHTML/PDF(CC BY). Lists, hash tables, trees, heaps, graphs, with analysis; editions in Java, C++ and pseudocode. - Problem Solving with Algorithms and Data Structures using Python, Brad Miller and David Ranum.
IntroHTMLInteractive. Runnable examples in the browser. - Algorithms, 4th edition booksite, Robert Sedgewick and Kevin Wayne. Free code, slides and summaries; the full book is 💲. Pair with the free Coursera course Algorithms, Part I (audit option).
- 💲 Classic: Data Structures and Algorithms in Java or in Python (Goodrich, Tamassia, Goldwasser).
- Pair with: MIT 6.006 Introduction to Algorithms.
4. Algorithms
- ⭐ Algorithms, Jeff Erickson.
Core/AdvancedPDF(CC BY). Recursion, dynamic programming, greedy, graphs, NP-hardness, written with unusual clarity and great exercises. Best for: a full algorithms course. - Algorithms (Dasgupta, Papadimitriou, Vazirani).
CorePDFdrafts on the author’s site. Short, elegant, popular at Berkeley. The final print edition is 💲 (McGraw-Hill). - Competitive Programmer’s Handbook, Antti Laaksonen.
CorePDF. Practical algorithms with the CSES problem set. - Algorithms for Competitive Programming (cp-algorithms).
ReferenceHTML. Community-maintained explanations of hundreds of algorithms. - 💲 Classic: Introduction to Algorithms (Cormen, Leiserson, Rivest, Stein; 4th edition 2022); The Algorithm Design Manual (Skiena); Algorithm Design (Kleinberg and Tardos).
- Pair with: MIT 6.046J and Tim Roughgarden’s Algorithms Illuminated videos (books 💲, videos free).
5. Computer Systems and Architecture
How programs actually run: data representation, assembly, memory hierarchy, linking, processes.
- ⭐ Dive into Systems, Suzanne J. Matthews, Tia Newhall, Kevin C. Webb.
Intro/CoreHTML. C, assembly (x86-64, ARM), memory, caches, OS basics, parallelism. Free online; print 💲 from No Starch. - Nand2Tetris.
IntroCourse. Build a computer from NAND gates to an OS. The book The Elements of Computing Systems is 💲, but projects and lectures are free. - Computer Organization (RISC-V resources from Berkeley CS61C).
CoreCourse. Free labs and lectures; the companion textbook (Patterson and Hennessy) is 💲. - What Every Programmer Should Know About Memory, Ulrich Drepper.
AdvancedPDF. The classic deep dive on caches and memory. - 💲 Classic: Computer Systems: A Programmer’s Perspective (Bryant and O’Hallaron, 3rd ed.); Computer Organization and Design (Patterson and Hennessy); Computer Architecture: A Quantitative Approach (Hennessy and Patterson).
- Pair with: CMU 15-213 course site (labs like Bomb Lab and Malloc Lab are famous).
6. Operating Systems
- ⭐ Operating Systems: Three Easy Pieces (OSTEP), Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau.
CorePDF(free chapters). Virtualization, concurrency, persistence. Arguably the most loved free CS textbook. - xv6: a simple, Unix-like teaching operating system, Russ Cox, Frans Kaashoek, Robert Morris.
CorePDF(book linked from the course page). Read the book, then modify a real kernel. - The Little Book of Semaphores, Allen B. Downey.
CorePDF. Synchronization puzzles that make concurrency click. - Is Parallel Programming Hard, And, If So, What Can You Do About It?, Paul E. McKenney.
AdvancedPDF. Concurrency from a Linux kernel expert. - Think OS, Allen B. Downey.
IntroPDF. A short primer for programmers. - 💲 Classic: Operating System Concepts (“the dinosaur book”, Silberschatz, Galvin, Gagne); Modern Operating Systems (Tanenbaum and Bos).
- Pair with: MIT 6.1810 Operating System Engineering labs.
7. Computer Networks
- ⭐ Computer Networks: A Systems Approach, Larry Peterson and Bruce Davie.
CoreHTML(CC BY). The full textbook, now open source and updated. - High Performance Browser Networking, Ilya Grigorik.
CoreHTML. TCP, TLS, HTTP/2, WebSocket and WebRTC for web engineers. Free online from O’Reilly. - Beej’s Guide to Network Programming, Brian “Beej” Hall.
IntroHTML/PDF. Sockets in C; the classic hands-on guide. - 💲 Classic: Computer Networking: A Top-Down Approach (Kurose and Ross; their author site has free videos and interactive exercises).
- Pair with: Stanford CS144 (build TCP yourself).
8. Databases
- ⭐ CMU 15-445/645 Database Systems, Andy Pavlo.
CoreCourse. Lectures on YouTube, notes and the BusTub project. The best free way to learn database internals. - Readings in Database Systems (“the Red Book”), 5th edition, Bailis, Hellerstein, Stonebraker.
AdvancedHTML/PDF. Curated papers with commentary. - Architecture of a Database System, Hellerstein, Stonebraker, Hamilton.
AdvancedPDF. How real relational databases are built. - Use The Index, Luke, Markus Winand.
CoreHTML. SQL indexing for developers. - 💲 Classic: Database System Concepts (Silberschatz, Korth, Sudarshan); Database Management Systems (Ramakrishnan and Gehrke); Database Internals (Petrov).
9. Compilers and Interpreters
- ⭐ Crafting Interpreters, Robert Nystrom.
CoreHTML. Build a tree-walk interpreter in Java and a bytecode VM in C. Free online, print 💲. Best for: the most enjoyable path into compilers. - Introduction to Compilers and Language Design, Douglas Thain.
CorePDF. A one-semester compiler course book, free from the author. - Essentials of Compilation, Jeremy G. Siek.
Core. Incremental compiler construction to x86-64, in Racket and Python editions (💲 MIT Press). The author publishes the LaTeX sources on GitHub. - Compiler Construction, Niklaus Wirth.
CorePDF. A compact classic from the author. - 💲 Classic: Compilers: Principles, Techniques, and Tools (the “Dragon Book”); Engineering a Compiler (Cooper and Torczon); Modern Compiler Implementation in ML/Java/C (Appel).
- Pair with: Stanford CS143.
10. Programming Languages
- ⭐ Programming Languages: Application and Interpretation (PLAI), Shriram Krishnamurthi.
CoreHTML/PDF. Learn languages by writing interpreters. - Software Foundations, Benjamin C. Pierce et al.
AdvancedInteractive. Logic, type systems and verification in the Rocq (formerly Coq) proof assistant. - Practical Foundations for Programming Languages (draft), Robert Harper.
AdvancedPDF. The author’s page hosts a preview version; the print book is 💲. - 💲 Classic: Types and Programming Languages (Pierce); Essentials of Programming Languages (Friedman and Wand).
11. Theory of Computation and Complexity
- ⭐ Introduction to Theoretical Computer Science, Boaz Barak.
CoreHTML/PDF. A modern take built around circuits, with Python-flavored examples. The text for Harvard CS 121. - Computational Complexity: A Modern Approach (draft), Sanjeev Arora and Boaz Barak.
AdvancedPDF. The authors’ draft is online; the book is 💲 (Cambridge). - Models of Computation (lecture notes), Jeff Erickson.
CorePDF. Automata and Turing machines notes that accompany his algorithms book. - 💲 Classic: Introduction to the Theory of Computation (Sipser); Introduction to Automata Theory, Languages, and Computation (Hopcroft, Motwani, Ullman).
- Pair with: MIT 18.404J Theory of Computation (Sipser’s lectures).
12. Distributed Systems
- ⭐ Distributed Systems, 4th edition, Maarten van Steen and Andrew S. Tanenbaum.
CorePDF. A free personalized digital copy is available from the author’s site. - Distributed Systems for Fun and Profit, Mikito Takada.
IntroHTML. A short, readable overview. - 💲 Classic: Designing Data-Intensive Applications (Kleppmann; 2nd edition with Chris Riccomini, O’Reilly, 2026).
- Pair with: MIT 6.5840 (formerly 6.824) Distributed Systems and its Raft labs.
13. Security and Cryptography
- ⭐ Security Engineering, Ross Anderson.
CorePDF. The second edition is free on the author’s page; third-edition chapters were also posted. A broad, systems-minded classic. - ⭐ A Graduate Course in Applied Cryptography, Dan Boneh and Victor Shoup.
AdvancedPDF. Rigorous modern cryptography, free from the authors. - The Joy of Cryptography, Mike Rosulek.
CorePDF. Undergraduate crypto with a clean, provable-security style. - Crypto 101, Laurens Van Houtven.
IntroPDF. Practical introduction for programmers. - 💲 Classic: Serious Cryptography, 2nd edition (Aumasson); Cryptography Engineering (Ferguson, Schneier, Kohno).
- Pair with: Stanford Cryptography I on Coursera (audit free) and CryptoHack.
14. Artificial Intelligence and Machine Learning
- ⭐ Dive into Deep Learning, Zhang, Lipton, Li, Smola.
CoreHTMLNotebooks. Runnable deep learning textbook. - ⭐ Probabilistic Machine Learning: An Introduction, Kevin P. Murphy.
Core/AdvancedPDF. - An Introduction to Statistical Learning.
IntroPDF. The friendliest classical ML text. - Artificial Intelligence: Foundations of Computational Agents, 3rd edition, David Poole and Alan Mackworth.
CoreHTML. A complete AI textbook (search, logic, planning, learning) free online from the authors with Cambridge’s permission. - Reinforcement Learning: An Introduction, Richard Sutton and Andrew Barto.
CorePDF. - 💲 Classic: Artificial Intelligence: A Modern Approach, 4th edition (Russell and Norvig).
- Full list: machine-learning-books.
15. Computer Graphics
- ⭐ Physically Based Rendering: From Theory to Implementation, 4th edition, Pharr, Jakob, Humphreys.
AdvancedHTML. The Academy Award-winning rendering book, free online. - Computer Graphics from Scratch, Gabriel Gambetta.
IntroHTML. Build a raytracer and rasterizer with only a putPixel function. - Ray Tracing in One Weekend series, Peter Shirley et al.
IntroHTML. Three short books that end with a working path tracer. - Learn OpenGL, Joey de Vries.
Intro/CoreHTML. Modern OpenGL step by step. - 💲 Classic: Fundamentals of Computer Graphics (Marschner and Shirley); Real-Time Rendering (Akenine-Möller et al.).
16. Software Engineering
- ⭐ Software Engineering at Google, Titus Winters, Tom Manshreck, Hyrum Wright (eds.).
CoreHTML. Free online; about engineering practices over time and at scale. - Site Reliability Engineering, Google.
CoreHTML. The SRE book and workbook, free. - MIT 6.031 Software Construction readings.
CoreHTML. Testing, specifications, abstract data types, concurrency. - The Missing Semester of Your CS Education.
IntroCourse. Shell, Git, editors, debugging: the tools courses forget. - 💲 Classic: Code Complete (McConnell); The Pragmatic Programmer; The Mythical Man-Month.
- Full list: software-engineering-books.
17. Electives Worth Knowing
Once the core is done, these free textbooks cover the most common upper-level electives.
Natural Language Processing
- ⭐ Speech and Language Processing, 3rd edition draft, Dan Jurafsky and James H. Martin.
CorePDF. The standard NLP text, kept current with chapters on transformers and LLMs. - Natural Language Processing with Python (NLTK book), Bird, Klein, Loper.
IntroHTML. Older, but a gentle hands-on start.
Information Retrieval and Search
- ⭐ Introduction to Information Retrieval, Manning, Raghavan, Schütze.
CoreHTML/PDF. Indexing, ranking, evaluation; free from Stanford. - Mining of Massive Datasets, Leskovec, Rajaraman, Ullman.
CorePDF. MapReduce, similarity search, PageRank, recommendation systems.
Computer Vision
- ⭐ Computer Vision: Algorithms and Applications, 2nd edition, Richard Szeliski.
CorePDF. Free PDF for personal use from the author. - Foundations of Computer Vision, Torralba, Isola, Freeman.
CoreHTML. MIT Press 2024; the authors host a free online version.
Parallel and High-Performance Computing
- Introduction to High-Performance Scientific Computing, Victor Eijkhout.
CorePDF. Part of the free “Art of HPC” series (also covers MPI and OpenMP). - Is Parallel Programming Hard? (see Operating Systems).
Quantum Computing
- Introduction to Classical and Quantum Computing, Thomas G. Wong.
IntroPDF. Free; assumes only trigonometry. - Qiskit learning platform.
Intro/CoreInteractive. Free courses with runnable circuits. - 💲 Classic: Quantum Computation and Quantum Information (Nielsen and Chuang).
Human-Computer Interaction
- The Encyclopedia of Human-Computer Interaction, 2nd ed., Interaction Design Foundation.
CoreHTML. Free chapters by leading researchers. - 💲 Classic: The Design of Everyday Things (Norman).
Numerical Computing
- Fundamentals of Numerical Computation, Driscoll and Braun.
CoreHTML. Free online with code.
How to Read a CS Textbook Efficiently
- Skim the chapter first (headings, figures, summary) for five minutes. Then read properly.
- Code every algorithm you read about, even if the book gives code. Typing it yourself and breaking it teaches more than reading.
- Do the end-of-chapter problems. Aim for at least the “starred” or recommended ones. Many free books (Erickson, OSTEP, MCS) have excellent problem sets.
- Pair text with lectures. Watch the lecture before reading if the topic is new; read before the lecture if it is review.
- Keep a lab notebook. For OS, networks and databases labs, write down every bug and what fixed it. That notebook becomes interview material.
- Teach it. Write a short blog post or explain the idea to a friend. Gaps show up immediately.
Comparison: Free vs Classic Textbook per Course
| Course | Free pick | Classic | When to buy the classic |
|---|---|---|---|
| Algorithms | Erickson | CLRS | You want an encyclopedic reference with pseudocode for everything |
| Systems | Dive into Systems | CS:APP | You will take CMU-style labs or want deeper x86-64 coverage |
| OS | OSTEP | Dinosaur book | Your course assigns it; otherwise OSTEP is enough |
| Networks | Peterson and Davie | Kurose and Ross | You prefer top-down (applications first) |
| Databases | CMU 15-445 + Red Book | Database System Concepts | You want end-of-chapter exercises in one place |
| Compilers | Crafting Interpreters + Thain | Dragon Book / Engineering a Compiler | You go deep into optimization and theory |
| Theory | Barak’s Intro TCS | Sipser | You want the classic, compact automata-first treatment |
| Distributed | van Steen | DDIA | You build data systems at work |
| AI | Poole and Mackworth, D2L | Russell and Norvig | You want the broadest single AI reference |
Projects That Prove You Learned It
| Course | Project | Rough time |
|---|---|---|
| Programming | Write a Scheme interpreter (SICP chapter 4) | 2 weeks |
| Data structures | Implement a hash map, a balanced BST and a heap with tests | 2 weeks |
| Algorithms | Solve 100 CSES problems | 2 to 3 months |
| Systems | Write a memory allocator (malloc/free) | 2 weeks |
| OS | Complete the xv6 labs: system calls, page tables, copy-on-write fork | 2 months |
| Networks | Implement TCP in the CS144 labs | 1 to 2 months |
| Databases | Build the BusTub buffer pool, B+ tree and query executor | 2 months |
| Compilers | Finish both interpreters in Crafting Interpreters | 2 months |
| Theory | Write a regex-to-NFA-to-DFA converter | 1 week |
| Distributed | Implement Raft and a sharded key-value store (MIT 6.5840 labs) | 2 months |
| Security | Complete 30 CryptoHack challenges | 1 month |
| Graphics | Build a path tracer (Ray Tracing in One Weekend) | 2 weeks |
Curricula and Guides This List Builds On
- Teach Yourself Computer Science: nine subjects, one book and one lecture series each.
- Open Source Society University (OSSU) Computer Science: a full free curriculum built from online courses.
- MIT OpenCourseWare EECS: lectures, notes and problem sets.
- ACM/IEEE CS curriculum guidelines (CS2023): what universities agree a CS degree should cover.
FAQ
What are the best computer science textbooks? The books most often called best for their course: SICP (programming), CLRS (algorithms), CS:APP (systems), OSTEP (operating systems), Kurose and Ross (networks), the Dragon Book or Crafting Interpreters (compilers), Sipser (theory) and Designing Data-Intensive Applications (data systems). The table above lists free alternatives for each.
Can I learn computer science for free? Yes. Every core course on this page has a legally free textbook and free lectures. What costs time, not money, is doing the labs.
Is CLRS worth it? As a reference, yes. As a first algorithms book, many self-learners find it dense. Start with Erickson’s free Algorithms or MIT 6.006, and keep CLRS for lookup.
SICP or HtDP for a first book? HtDP if you are new to programming, SICP if you already code and want deeper ideas. Berkeley’s Composing Programs gives SICP’s ideas in Python.
Is OSTEP enough for operating systems? For most people, yes, especially combined with the xv6 labs. Read the dinosaur book only if your course requires it.
Which free textbook is best for computer networks? Computer Networks: A Systems Approach (open source, CC BY) as the textbook, and Stanford CS144 for hands-on labs.
Do I need a CS degree to read these? No. You need persistence and basic math. Start with Teach Yourself CS’s order or the roadmap above.
What about textbooks for competitive programming or interviews? See the Competitive Programmer’s Handbook and cp-algorithms above. For interview-specific prep, see the Ralpberry Labs interview repos.
Are older editions okay? Usually. CS fundamentals change slowly. For networks, security and ML, prefer editions from the last five years.
Where to Go Next
- free-math-textbooks: the math behind algorithms, graphics and ML.
- best-programming-books: the all-time favorite books by topic.
- software-engineering-books: craft, architecture and teams.
- machine-learning-books: ML, deep learning and LLM books by level.
Contributing
Pull requests are welcome. For a new textbook, include:
- The course it maps to.
- An official link (author, university or publisher; never unofficial PDFs).
- Whether it is free or 💲, plus one sentence on who it suits.
Broken links and books that stopped being free are the most useful reports.
License
This list is released under CC BY 4.0. Books and courses belong to their authors and keep their own licenses.
If this helped you, a star helps others find it.
More free resources
Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.