Visualizing algorithms, bringing light to the madness, for 100 days straight
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
src
.babelrc
.eslintrc
.gitignore
README.md
package.json
webpack.config.js

README.md

100 Days of Algorithms

See everything in one place on this here tumblr blog.

  • Day 1 - Binary Search
  • Day 2 - Selection Sort
  • Day 3 - Insertion Sort
  • Day 4 - Merge Sort
  • Day 5 - Quick Sort
  • Day 6 - Pigeonhole Sort
  • Day 7 - Closest Point on Line
  • Day 8 - Closest Pair of Points
  • Day 9 - Convex Hull (Jarvis March)
  • Day 10 - Point Inside a Polygon
  • Day 11 - Line Intersections
  • Day 12 - Sweepline Line Intersections
  • Day 13 - Separating Axis Theorem
  • Day 14 - Binary Search Tree Construction
  • Day 15 - Level Order Traversal
  • Day 16 - Depth First Traversal (Pre-order)
  • Day 17 - Depth First Traversal (Post-order)
  • Day 18 - Depth First Traversal (In-order)
  • Day 19 - BST to Min-Heap
  • Day 20 - Prim's Minimum Spanning Tree
  • Day 21 - Prim's on a Regular Grid
  • Day 22 - Prim's on a Dense Grid
  • Day 23 - Prim's on a Sparse Grid
  • Day 24 - Pathfinding using Prim's MST
  • Day 25 - Run Length Encoding
  • Day 26 - The Game of Life
  • Day 27 - Game of Life, Gosper Gun
  • Day 28 - Game of Life, Backrake
  • Day 29 - Game of Life, P177 Oscillator
  • Day 30 - Factorial (Recursive)
  • Day 31 - Fibonacci (Recursive)
  • Day 32 - Fibonacci (Dynamic Programming - Memoized)
  • Day 33 - Fibonacci (Dynamic Programming - Bottom Up)
  • Day 34 - Fibonacci (Dynamic Programming - Bottom Up Optimized)
  • Day 35 - Peakfinding 2D
  • Day 36 - Longest Commmon Subsequence
  • Day 37 - Edit Distance
  • Day 38 - 0-1 Knapsack
  • Day 38 - Word Wrapping
  • Day 40 - Bresenham's Line Algorithm
  • Day 41 - Pattern Searching
  • Day 42 - Poisson Disk Distribution
  • Day 43 - Poisson Disk Distribution 2
  • Day 44 - Poisson Disk Distribution 3
  • Day 45 - Lissajous Curve V1
  • Day 46 - Lissajous Curve V2
  • Day 47 - Cantor Set
  • Day 48 - Koch Curve
  • Day 49 - Koch Snowflake
  • Day 50 - Diamond Square
  • Day 51 - Isometric Perspective
  • Day 52 - Isometric Height Map
  • Day 53 - Height Map Perspective
  • Day 54 - Diamond Square vs Simplex Noise
  • Day 55 - Terrain Panning
  • Day 56 - Rot13
  • Day 57 - Rot13 V2
  • Day 58 - Vigenèr Cipher
  • Day 59 - Bitwise Shifting
  • Day 60 - djb2 Hash
  • Day 61 - djb2 Hash V2
  • Day 62 - djb2 Collisions
  • Day 63 - djb2 Collisions Improved
  • Day 64 - SHA
  • Day 65 - Diffie Hellman
  • Day 66 - Birthday Paradox
  • Day 67 - Bitwise OR
  • Day 68 - Bitwise AND
  • Day 69 - Bitwise XOR
  • Day 70 - Permutations
  • Day 71 - Knight's Tour
  • Day 72 - N-Queens
  • Day 73 - Tower of Hanoi
  • Day 74 - Quadtree
  • Day 75 - Quadtree V2
  • Day 76 - k-d Tree
  • Day 77 - Voronoi
  • Day 78 - Voronoi Improved
  • Day 79 - Voronoi V3
  • Day 80 - Palindrome
  • Day 81 - KMP Pattern Searching
  • Day 82 - KMP V2
  • Day 83 - KMP V3
  • Day 84 - Fisher-Yates Shuffle
  • Day 85 - Fisher Yates V2
  • Day 86 - Ode to Fizzbuzz
  • Day 87 - Stable Marriage
  • Day 88 - Chaos Game
  • Day 89 - Chaos Game V2
  • Day 90 - Chaos Game V3
  • Day 91 - Matched Brackets
  • Day 92 - Job Scheduling
  • Day 93 - 100 Doors
  • Day 94 - Linked List
  • Day 95 - Doubly Linked List
  • Day 96 - DOM Tree
  • Day 97 - Next Smallest
  • Day 98 - Anagrams
  • Day 99 - Flatten Array
  • Day 100 - Linked List Cycle

Downloading

Please Note: This project was not about clean code, it was about producing new work everyday. As a result, little time was spent on code cleanup and optimization.

If you'd like to run these examples yourself, run the following to clone the repo, install dependencies, and build the output files

$ git clone https://github.com/jcharry/100daysofalgorithms.git
$ npm install
$ npm run build

Once everything is built, start a local server with directory

$ http-server -p 1234

If you get an error, install http-server with $ npm install -g http-server

Navigate to localhost:1234 in a browser, and navigate to the build folder.

To Edit

NOTE:

After day 97 - webpack started to consume too much memory if running in --watch mode. The reason is it's watching almost 100 different builds at once. To work around this, you might have to move some of the source files out of the src/ folder, into another directory temporarily. Or just delete the ones you're not interested in. Didn't see this one coming, but since I'm basically done at this point - I don't see a reason to go back and reconfigure webpack to work for all 100 days at the same time.

Instead of running $ npm run build above, run $ npm run dev, start the server in a new terminal window, and navigate to localhost:1234.

Any changes made to src files will trigger a re-build of generated files. Just refresh your browser and you should see any changes.