Skip to content

saeed-vayghan/Data-Structure

Repository files navigation

Data-Structure

Collection of pure js data-structure

Built in structures

  1. Array
  2. Map (Hashtable is a data structure that maps keys to values, Perfect hash function assigns each key to a unique index.)
  3. Set
  4. Weak Map
  5. Weak Set

Basic

  1. queue.js: Queue, First In First Out
  2. stack.js: Stack, Last In First Out
  3. balanced-parentheses.js: Using stack to validate balanced characters
  4. balanced-brackets.js: Using stack to validate balanced-brackets
  5. linked-list.js: Linked List, Support Next and Prev Node
  6. queue-with-two-stacks.js: Queue with two stacks
  7. priority-queue.js: Priority Queue
  8. tree-dfs-bfs.js: Tree Search (BFS and DFS)
  9. binary-tree.js: Binary Tree
  10. trie-tree.js: Trie Tree
  11. merkle-tree-simple.js: A simple and trivial implementation of sorted merkel tree

To Do

  1. LRU Cache - Least Recently Used data (using Doubly-Linked-List and Hash-Table)

About

Collection of pure js data-structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published