Code Monkey home page Code Monkey logo

algosd's Introduction

Table of Contents

1. Path Finding

Concepts

Each grid cell represents a node in a implicit graph.

  • Each node has 4 adjacent node
  • The distance between adjecent node is 1 unit

Features

  • Search algorithms

    • Depth-First Search
    • Breadth-First Search
    • A* Search
    • Dijkstra
  • Pattern generation algorithms

    • Basic random
    • Randomized DFS
    • Recursive division
    • Kruskal's Algorithm
    • Prim's Algorithm
  • Draw your own wall nodes with mouse

  • Drag and drop the source and target nodes

  • Control animation speed

2. Sorting

Concepts

Each bar represent a positive integer value and we compare two value to sort in ascending order

Features

  • Sorting Algorithms

    • Bubble sort
    • Selection sort
    • Insertion sort
    • Quick sort
    • Merge sort
  • Control size of bars

  • Generate new random bars

  • Control animation speed

3. Spiral Prime

Concepts

Each grid represent a positive interger number

  • we check the number is prime or not
  • if the number is prime then mark as a circle

Features

  • Count the total of prime numbers
  • Creating Spiral from the center of grid

4. N Queen Problem

Concepts

The whole square grid represent chess board and A queen can attack the other queens by moving any number of squares vertically, horizontally or diagonally the algorithm place the queen column by column and check the queen attack each other or not...

Features

  • Resize the chess board
  • Control animation speed

Installation

# To install all dependencies of the project.
> npm install

# To run the app on http://localhost:3000.
> npm run start

# To build the bundled app for production on the `build` folder.
> npm run build
> npm run deploy

Acknowledge

I took inspirations from the following sources for some of the segments.

What I have revised/learnt by doing this project

  1. implementing algorithm to visualize
  2. initialize each cell to object/class
  3. JS Promise to run animation asyncronusly
  4. array destructure (usestate hooks)
  5. reference and copy variable
  6. difference between == and === .For example "false===0" it's false
  7. For only use React state/useState to re-render dom-elememt. otherwise use global variable to access from all corner
  8. writing re-useable code

algosd's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.