OccupyMars2025 / Introduction-to-Algorithms-4th-Edition

Time is Money, Efficiency is Life
MIT License
1 stars 0 forks source link
algorithms

If you don't understand sth, that's okay. What you need to do is to read a lot of material(I mean a few hundred pages) and complete all the exercises on your own. But remember to start with material that fits your ability level. Yes, that's how we get things done. Very simple ! So easy !

So tell me, what are you eager to know ?

I am very interested in how to use programming to solve various real-world problems.

Great ! Then allow me to introduce you to the best introductory material: Introduction to Algorithms (Fourth Edition)

Excellent ! Let’s get to work !


Before reading the solution to a problem in the book, I like to challenge myself to try to solve it myself. So exciting !!!

You must implement all the algorithms on your own, complete all the exercises on your own, and prove and derive all the theorems on your own. Turn off Copilot and only turn to ChatGPT for some advice when you are stuck for at least 5 minutes. This method may seem slow, but it is actually the most efficient way to learn. Wow, that's so exciting ! Let's do it !


Learning Standards:

Phase 1: Choose any theorem or exercise from the textbook and be able to prove or solve it entirely on your own.

Phase 2: "What I cannot create, I do not understand." Rewrite the entire textbook from memory, without referring to the original text.


2023/1/9 18:00 - 1/12: round 1

2024/5/6 12:00 - 6/13: round 2

2024/9/6 21:00 - now: continue round 2, start from ch14: dynamic programming


2018: https://github.com/walkccc/CLRS

"clrsPython" is copied from the official website

https://github.com/OccupyMars2025/Solutions-to-Introduction-to-Algorithms-Third-Edition


useful tools:

Data Structure Visualizations

https://app.diagrams.net/

use networkx, graphviz to draw graphs

https://networkx.org/documentation/stable/auto_examples/index.html


TODO: all the exercises and problems in ch1-ch11 in the 4th edition book, I have only completed them in ch1-ch11 in the 3rd edition book

Goal: 2024/5/6 12:00 - 5/25 22:00: complete learning this book

TODO: chapter 9

TODO: Exercise 10.2-8

TODO: chapter 11.2 - 11.5

TODO: page 289-293


How to study "algorithms" ? Recommend some textbooks and learning resources

Studying algorithms is essential for understanding problem-solving techniques, data processing, and optimizing code. Here’s a study approach with recommended resources to build your skills in algorithms:

Approach

  1. Start with Basics: Understand basic concepts, including data structures (arrays, linked lists, stacks, queues, trees, graphs) and algorithmic fundamentals (sorting, searching, recursion).
  2. Master Algorithm Analysis: Learn about time and space complexity using Big O notation, which helps in evaluating algorithm efficiency.
  3. Practice Core Algorithms: Focus on common algorithms such as sorting, searching, dynamic programming, and graph algorithms.
  4. Practice Problem-Solving: Regularly practice coding problems to internalize techniques and improve your speed and accuracy.
  5. Explore Advanced Topics: Study advanced topics like NP-completeness, advanced graph algorithms, and optimization techniques.

Recommended Textbooks

  1. "Introduction to Algorithms" by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein (CLRS) – Often called the "CLRS book," this comprehensive textbook covers a wide range of algorithms with in-depth explanations and mathematical rigor.
  2. "Algorithms" by Robert Sedgewick and Kevin Wayne – A practical book that includes examples in Java, with a focus on problem-solving techniques and efficient coding.
  3. "The Algorithm Design Manual" by Steven S. Skiena – Known for its practical approach, this book is highly readable and includes real-world examples along with a "war story" section for each topic.
  4. "Grokking Algorithms" by Aditya Bhargava – A visually-oriented, beginner-friendly book that introduces algorithm concepts with engaging diagrams and examples.
  5. "Algorithms Illuminated" by Tim Roughgarden – This series provides clear, step-by-step explanations of algorithms and is available in multiple volumes, each covering different topics.

Additional Learning Resources

Using these resources to develop both your theoretical understanding and practical coding skills will create a strong foundation in algorithms. Regular practice and challenging yourself with increasingly complex problems will solidify your knowledge over time.


Introduction to Algorithms, Fourth Edition

Time is Money, Efficiency is Life

Algorithms as a Technology

"We hope that this textbook provides you with an enjoyable introduction to the field of algorithms. We have attempted to make every algorithm accessible and interesting. Enjoy it !"

"CLRS" (Cormen, Leiserson, Rivest, Stein)

official website of this book

reference:

https://github.com/walkccc/CLRS
https://walkccc.me/CLRS/
https://sites.math.rutgers.edu/~ajl213/CLRS/CLRS.html
https://github.com/walkccc/CLRS-cpp

tools:

install all the latest LLVM toolchain: https://apt.llvm.org/