Source code of Learning JavaScript Data Structures and Algorithms (4th edition) book.
- 01: Introducing Data Structures and Algorithms in JavaScript
- 02: Understanding Big O Notation
- 03: Arrays
- Hackerrank exercises:
- Arrays DS
- Array Left Rotation
- Hackerrank exercises:
- 04: Stacks
- Stack data structure (array-based)
- Stack data structure (object-based)
- Decimal to binary algorithm
- Decimal to bases 2-32 algorithm
- Decimal to bases 2-32 or 64 algorithm
- Tower of Hanoi algorithm
- LeetCode exercises:
- Valid Parantheses
- MinStack
- Simplify Path
- 05: Queues and Deques
- 06: Linked Lists
- 07: Sets
- 08: Dictionaries and Hashes
- 09: Recursion
- 10: Trees
- 11: Binary Heap and Heap Sort
- 12: Tries
- 13: Graphs
- 14: Sorting Algorithms
- 15: Searching and Shuffling Algorithms
- 16: String Algorithms
- 17: Math Algorithms
- 18: Algorithm Designs and Techniques
You can find the source code organized by chapter under the src
folder.
Each file has the .js
and the .ts
extension, so you get both the JavaScript and the Typescript versions of the source code.
Each data structure and algorithm from parts 2 and 3 also have a _test_
folder where you can find the respective Jest
test cases.
Install all dependencies
npm install
Run all tests
npm test
Run a particular example
cd src/01-intro
node 01-hello-variables.js
or:
node src/01-intro/01-hello-variables.js
- JavaScript
- TypeScript
- Jest (tests)
Happy Coding!