Code Monkey home page Code Monkey logo

datastructures-algorithms's Introduction

datastructures-algorithms

List of Programs related to data structures and algorithms

Data Strctures

Stack

  1. Stack using array: JavaScript

  2. Stack using linkedlist: JavaScript

Queue

  1. Queue using array: JavaScript
  2. Queue using linkedlist: JavaScript
  3. Queue using stack: JavaScript

Linkedlist

  1. Linkedlist implementation: JavaScript

DoublyLinkedlist

  1. DoublyLinkedlist implementation: JavaScript

Tree

  1. Binary Search Tree: JavaScript

Graphs

  1. Unweighted undirected graph: JavaScript

HashTable

  1. HashTable: JavaScript

Algorithms

Array

  1. Contains duplicates : JavaScript

  2. Product of array except self: JavaScript

  3. Max sum subarray: JavaScript

  4. Maximum product subarray: JavaScript

  5. Find minimum in rotated sorted array: JavaScript

  6. Maximum Circular subarray: JavaScript

  7. Rotate array: JavaScript

  8. Search in rotated sorted array: JavaScript

  9. 3 sum: JavaScript

  10. Container with most water: JavaScript

  11. Best time to buy stock and sell stock: JavaScript

String

  1. Longest substring without repeating characters: JavaScript

  2. Longest repeating character replacement: JavaScript

  3. Minimum window substring: JavaScript

  4. Valid anagram: JavaScript

  5. Group anagrams: JavaScript

  6. Valid parentheses: JavaScript

  7. Valid palindrome: JavaScript

  8. Longest palindromic substring: JavaScript

  9. Palindromic substrings: JavaScript

  10. Encode and decode strings: JavaScript

  11. Greatest common devisor of strings: JavaScript

Dynamic programming

  1. Climbing stairs: JavaScript

  2. Coin change: JavaScript

  3. Longest increasing subsequence: JavaScript

  4. Longest common subsequence: JavaScript

  5. Word break problem: JavaScript

  6. Combination Sum 4: JavaScript

  7. House robber: JavaScript

  8. House robber 2: JavaScript

  9. Decode ways: JavaScript

  10. Unique paths: JavaScript

  11. Jump game: JavaScript

Binary

  1. Sum of two integers: JavaScript

  2. Number of 1 Bits: JavaScript

  3. Counting Bits: JavaScript

  4. Missing number: JavaScript

  5. Reverse Bits: JavaScript

LinkedList

  1. Reverse substring: JavaScript

  2. Detect cycle in a linkedlist: JavaScript

  3. Merge two sorted lists: JavaScript

  4. Merge K sorted lists: JavaScript

  5. Remove Nth node from end of list: JavaScript

  6. Reorder list: JavaScript

  7. Find middle node: JavaScript

  8. Find Kth node from end of list: JavaScript

  9. Partition list: JavaScript

  10. Remove duplicates: JavaScript

  11. Binary to decimal: JavaScript

Doubly linkedlist

  1. Swap first and last: JavaScript

  2. Palindrome check: JavaScript

  3. Swap node pairs: JavaScript

Tree

  1. Maximum depth of binary tree: JavaScript

  2. Same tree: JavaScript

  3. Invert or Flip binary tree: JavaScript

  4. Binary tree maximum path sum: JavaScript

  5. Binary tree level order traversal: JavaScript

  6. Serialize and deserialize binary tree: JavaScript

  7. Subtree of another tree: JavaScript

  8. Construct binary tree from preorder and inorder traversal: JavaScript

  9. Validate BST: JavaScript

  10. Kth smalleest element in BST: JavaScript

  11. Lowest Common Ancestor of BST: JavaScript

  12. Trie: JavaScript

  13. Design and Search words Datastructure: JavaScript

  14. Word search 2: JavaScript

Graph

  1. Clone graph: JavaScript

  2. Course schedule: JavaScript

  3. Pacific Atlantic waterflow: JavaScript

  4. Number of Islands: JavaScript

  5. Longest consequtive sequence: JavaScript

  6. Alien dictionary: JavaScript

  7. Graph valid tree: JavaScript

  8. Number of connected components in an undirected graph: JavaScript

Matrix

  1. Set matrix zeros: JavaScript

  2. Spiral matrix: JavaScript

  3. Rotate image: JavaScript

  4. Word search: JavaScript

Interval

  1. Insert interval: JavaScript

  2. Merge interval: JavaScript

  3. Non-overlapping intervals: JavaScript

  4. Meeting rooms: JavaScript

  5. Meeting rooms 2: JavaScript

Hashtable

  1. Duplicates: JavaScript

  2. Find two sum indices: JavaScript

  3. First non repeating character: JavaScript

  4. Group anagram: JavaScript

  5. Verify Common Elements: JavaScript

Sorting

  1. Bubble sort: JavaScript

  2. Selection sort: JavaScript

  3. Insertion sort: JavaScript

  4. Merge sort: JavaScript

  5. Quick sort: JavaScript

datastructures-algorithms's People

Contributors

sudheerj avatar writetosurya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datastructures-algorithms's Issues

Code Playgrounds

Great work. Thank you!

I suggest adding playgrounds to allow trying out code, similar to TheAlgorithms website, which uses LiveCodes (see example).

Please allow me to introduce LiveCodes, a feature-rich, open-source, client-side, code playground that supports 80+ languages and frameworks, including JS, TS, React, Vue, Svelte, Solid, Python, Go, Ruby, PHP and others (see starter templates). The announcement post gives a general overview.

Projects can be shared, exported and deployed (to GitHub Pages). Code can be imported from many sources including GitHub.

LiveCodes is very configurable. Many of the features can be configured by query parameters

For example, to load the bubble sort algorithm from this URL:

https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/sorting/bubbleSortLinkedlist.js

Add it to the query parameter x like that, (also have the console open):

https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/sorting/bubbleSortLinkedlist.js

open in LiveCodes

Screenshot:

image

You may want, for example, to add links to the algorithms in the repo README like that:


Bubble Sort: implementation - playground


LiveCodes also allows running automated tests (using Jest). This feature is used by TheAlgorithms website to validate the algorithms implementation.

Playgrounds can also be embedded in any webpage, using a powerful, yet easy-to-use, SDK.

Comprehensive documentations are available with live demos, code samples and screenshots.

LiveCodes is free with unlimited usage, no ads and no account required. It can be easily self-hosted (if you want), and can be used for commercial projects (MIT license).

Disclosure: obviously, I'm the author of LiveCodes.

If you feel this can be useful, I can help getting started with providing playgrounds for the code in this repo or for other projects.

I thought you would be interested. Otherwise, please feel free to close this.
Thank you.

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.