My solutions in Rust for all the problems in the book : ISBN-10: 1736049135
- Including Bonus.pdf
- One directory per chapter (01_two_pointers ... 19_math_and_geometry)
- In the directories, the number at the beginning of the filename (e.g.,
10_xxx.ipynb,14_yyy.ipynb) corresponds to the page number in the book. - When the filename starts with
bonus_the exercice is one of thebonus.pdf - A copy of
bonus.pdfis available in the/assetsdirectory
- I do NOT provide any explanation about the algorithm. Read the book.
- There is a recap of the challenge at the top of the page
- Then you will find the following sections
- The point : The tip or the trick to keep in mind about the puzzle
- Complexity : Recap of the time & space complexities
- TODO : This is mostly for me
- About Rust :
- You will find here a list of function calls, idioms, constructs...
- There is no order, no priority
- This is mostly for me since I'm learning Rust
- I can repeat some items from one solution to another if I have trouble to keep them in mind
- I usually confirm if the code of the cell has been executed in the Rust Playground
- There may be cells with code that doesn't work and I explain why
- If there are multiple versions of the same solution
- I explain the changes from one version to the next.
- If it make sense, I highlight if one of the versions is my Preferred solution
- When we come back to a notebook with several versions, the lime color makes it easy to find the one I prefer (this is purely personal)
This how the beginning of a notebook may look like :
- All code examples are self-contained. By that, I mean that, unlike the code presented in the book or in the associated GitHub repository, they are not just isolated functions; instead, each example includes a
main()function where I demonstrate how to invoke the function and how to initialize any required data structures. - For example, in Chapter 11, which covers binary trees, all the solutions I provide create the trees used in the chapter and display the results. The idea is really that each piece of code should be self-sufficient and easy to run.
- Yes, it results in more code, but I find it much more practical.
- In most of the code examples, I try to keep the names of functions, variables... identical to those in the book.
- Shame on you 😁. Read this README.
- You can copy and paste the code of the cell of interest either :
- In a local project on your PC. Read this page where I share my setup on Windows 11.
- A better solution is to start by using the Rust Playground.
- In both cases, you may have to uncomment the line :
fn main(){
- The page where I explain how to Use Rust in Jupyter Notebooks on Windows
- My repo with code in Python.
- In the README I explain why I believe it is better to use Jupyter Notebooks in this learning context.
- The repo of the book
This project is developed for personal and educational purposes. Feel free to explore and use it to enhance your own learning in Rust and algorithm.
Given the nature of the project, external contributions are not actively sought nor encouraged. However, constructive feedback aimed at improving the project (in terms of speed, accuracy, comprehensiveness, etc.) is welcome. Please note that this project is being created as a hobby and is unlikely to be maintained once my initial goal has been achieved.


