Skip to content

rochimensi/js-data-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Javascript Data Structures

These are some scripts I wanted to share from my learnings on data structures.

You will find the algorithms to manipulate Linked Lists, Binary Search Trees and Hash maps.

Linked Lists

The following functions are provided:

  • Add node to Head
  • Add node to Tail
  • Remove node from Head
  • Remove node from Tail
  • Search for a node value
  • Get indexes of a node value

Binary Search Tree

The following functions are provided:

  • Insert Node
  • Has value
  • Depth-First Search (in-order, pre-order, post-order)
  • Breadth-First Search
  • Get minimum value
  • Get maximum value

Hash Table

The following functions are provided:

  • Hash a key
  • Insert Node with key-value
  • Get a Node by key
  • Get all Nodes