/DataStructures-Algorithms

Data Structures and Algorithms

Primary LanguageJava

Build Status codecov

DataStructures

Java Implementations of following

  • Doubly Linked List
  • Binary Search Tree
  • UnionFind - Disjoint set.
    • Quick Find
    • Quick Union
    • Weighted Quick Union
  • Stack
    • Using Linked List

Algorithms

  • Based on UnionFind DataStructure.
    • Percolation
    • Triplets Red Black Tree
  • Based on Stack
    • Queue using two stacks
  • Sorting
    • Selection sort
    • Insertion sort
    • Merge sort
    • Shell sort
    • Quick sort
  • Shuffle
    • This is shuffle implementation generates a random permutation of the given array.
    • One of the use-case of this shuffle algorithm is in Quick sort to get good performance.

Math implementations

  • GCD - Greatest Common Divisor
  • isPrime - Recursive and Iterative
  • decimal to binary conversion - recursive
  • LCM - Least Common Multiplier

String Utility Implementations

  • Reverse a string : Recursive
  • Remove duplicates : Recursive