Skip to content

Near99/data-structures-and-algorithms-in-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practical Data structures and Algorithms in TypeScript

Linked List

✔️: Singly Linked List Implementation With Tail.

  • LinkedList<T>.insertFront() - insert a new element to the front.
  • LinkedList<T>.insertBack() - insert a new element to the end.
  • LinkedList<T>.removeFront() - remove the first element.
  • LinkedList<T>.removeEnd() - remove the last element.
  • LinkedList<T>.remove() - remove element by given value.
  • LinkedList<T>.reverse() - reverse the list.

Sorting

  • Bubble Sort - bubble sort, Time: best: O(n), average: O(n^2), worst: O(n^2); Space: O(1). Stable.
  • Insertion Sort - insertion sort, Time: best: O(n), average: O(n^2), worst: O(n^2); Space: O(1). Stable.
  • Selection Sort - selection sort, Time: best: O(n^2), average: O(n^2), worst: O(n^2); Space: O(1). Not Stable.
  • Heap Sort - heap sort, Time: best: O(nlogn), average: O(nlogn), worst: O(nlogn); Space: O(1). Not Stable.
  • Merge Sort - merge sort, Time: best: O(nlogn), average: O(nlogn), worst: O(nlogn); Space: O(n). Stable.
  • Quick Sort - quick sort, Time: best: O(nlogn), average: O(nlogn), worst: O(n^2); Space: O(logn). Not Stable.

Graphs

  • Shorted Path Unweighted Graph

About

Data structures and algorithms in TypeScript - Study Notes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published