All Projects → thawkin3 → js-data-structures-and-algorithms

thawkin3 / js-data-structures-and-algorithms

Licence: MIT License
JavaScript implementations of common data structure and algorithm concepts.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to js-data-structures-and-algorithms

Algorithms Leetcode Javascript
Algorithms resolution in Javascript. Leetcode - Geeksforgeeks - Careercup
Stars: ✭ 157 (+406.45%)
Mutual labels:  computer-science, data-structures, coding-interviews
Techinterview
💎 Cheat sheet to prep for technical interviews.
Stars: ✭ 454 (+1364.52%)
Mutual labels:  computer-science, data-structures, coding-interviews
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+20064.52%)
Mutual labels:  computer-science, data-structures, coding-interviews
coding-interview-guide
A systematic coding interview guide
Stars: ✭ 76 (+145.16%)
Mutual labels:  computer-science, data-structures, coding-interviews
Coding Interview University
A complete computer science study plan to become a software engineer.
Stars: ✭ 204,859 (+660735.48%)
Mutual labels:  computer-science, data-structures, coding-interviews
Leetcode
LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)
Stars: ✭ 45,650 (+147158.06%)
Mutual labels:  computer-science, data-structures
19 udacity dsa
Data Structures & Algorithms Nanodegree Program from Udacity
Stars: ✭ 140 (+351.61%)
Mutual labels:  computer-science, data-structures
Data Structures And Algorithms
Data Structures and Algorithms implemented In Python, C, C++, Java or any other languages. Aimed to help strengthen the concepts of DS&A. Give a Star 🌟 if it helps you.
Stars: ✭ 146 (+370.97%)
Mutual labels:  computer-science, data-structures
C Plus Plus
Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
Stars: ✭ 17,151 (+55225.81%)
Mutual labels:  computer-science, data-structures
Leetcode
LeetCode solutions, written in python and cpp(LeetCode解题报告,记录自己的leetcode成长之路)
Stars: ✭ 179 (+477.42%)
Mutual labels:  computer-science, data-structures
algoexpert-data-structures-algorithms
A collection of solutions for all problem statements on the AlgoExpert Coding Interview platform.
Stars: ✭ 134 (+332.26%)
Mutual labels:  data-structures, coding-interviews
C
Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.
Stars: ✭ 11,897 (+38277.42%)
Mutual labels:  computer-science, data-structures
Ready For Tech Interview
💻 신입 개발자로서 준비를 하기 위해 지식을 정리하는 공간 👨‍💻
Stars: ✭ 1,035 (+3238.71%)
Mutual labels:  computer-science, data-structures
Ultimate Java Resources
Java programming. All in one Java Resource for learning. Updated every day and up to date. All Algorithms and DS along with Development in Java. Beginner to Advanced. Join the Discord link.
Stars: ✭ 143 (+361.29%)
Mutual labels:  computer-science, data-structures
Algos And Data Structures
Collection of Test Specs and Implementation of various algorithms and data structures from the Princeton Coursera course: Intro to Algorithms part 1 and 2
Stars: ✭ 31 (+0%)
Mutual labels:  computer-science, data-structures
Huprog
A repo which includes the HUPROG'17(Hacettepe University Programming Contest)'s questions and the solutions of that questions.
Stars: ✭ 11 (-64.52%)
Mutual labels:  computer-science, data-structures
Fucking Algorithm
刷算法全靠套路,认准 labuladong 就够了!English version supported! Crack LeetCode, not only how, but also why.
Stars: ✭ 99,705 (+321529.03%)
Mutual labels:  computer-science, data-structures
Computer Science In Javascript
Computer science reimplemented in JavaScript
Stars: ✭ 2,590 (+8254.84%)
Mutual labels:  computer-science, data-structures
Javascript Algorithms
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
Stars: ✭ 133,406 (+430241.94%)
Mutual labels:  computer-science, data-structures
Algor In Js
Various Basic Data Structures and Algorithms Implement in Javascript
Stars: ✭ 22 (-29.03%)
Mutual labels:  computer-science, data-structures

JS Data Structures and Algorithms

npm Build Status Codecov npm bundle size npm Commitizen friendly Conventional Commits License: MIT code style: prettier

JavaScript implementations of common data structure and algorithm concepts.

Purpose

The purpose of this project is to help others learn and understand data structures and algorithms from a JavaScript perspective. Rather than containing only snippets of code with accompanying explanations, this project is meant to provide an eager learner with fully working code, good test cases, and a playground full of examples.

While the primary purpose of this project is education, the data structures and algorithms are implemented here as real working code and can be used as such. This project is published on npm as js-data-structures-and-algorithms.

Demos

Demos can be found at: http://tylerhawkins.info/js-data-structures-and-algorithms/storybook-dist

Data Structures

Algorithms

Searching (Array)

Searching (String)

Searching (Tree and Graph)

  • Breadth-First Search (TODO)
  • Depth-First Search (TODO)

Sorting

Sets

Running the Demos Locally

To run the Storybook examples locally on your own machine, follow these steps:

  1. Clone or download this repo
  2. Install the needed dependencies using yarn install
  3. Start up the Storybook app using yarn storybook

That's it! The Storybook app should start running at your localhost on port 9009, and the browser tab should be opened for you automatically.

Using the npm Package in Your App

To use these data structures and algorithms in your own app, follow these steps:

  1. Install the npm package using yarn add js-data-structures-and-algorithms (or npm install js-data-structures-and-algorithms)
  2. Import any of the exported modules like import { Stack } from 'js-data-structures-and-algorithms'
  3. At this point, you're good to instantiate these classes (ex. const myStack = new Stack()) and use their methods in your app (ex. myStack.push(42)).

Yarn Commands

For a complete list, see package.json.

  • yarn install: Installs dependencies
  • yarn storybook: Starts up the Storybook app locally so you can view the demos and examples
  • yarn build-storybook: Builds a static site out of the Storybook app (this is what is hosted here: http://tylerhawkins.info/js-data-structures-and-algorithms/storybook-dist)
  • yarn build: Generates the minified build from the source code using Rollup
  • yarn test: Runs all tests
  • yarn test:coverage: Runs all tests and includes coverage report
  • yarn test:logs: Runs tests in watch mode and includes console log output to show the internals of what is going on during each iteration of algorithms being run (for instance, it shows the current state of an array that is being sorted during each step of the given algorithm)
  • yarn test:watch: Runs tests in watch mode
  • yarn prettier: Formats the code so you don't have to worry about white space and other formatting during development
  • yarn prettier-watch: Runs prettier in watch mode
  • yarn eslint: Runs eslint to lint JS files
  • yarn stylelint: Lints CSS files and auto-fixes issues where possible
  • yarn cz: Uses commitizen to walk you through some steps via the cli and then commits your code using a formatted commit message that it generates
  • yarn release: Bumps the package version and generates the changelog using standard-version

Contributing

Please see the Contributing Guidelines.

Code of Conduct

The Code of Conduct can be found here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].