algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Data Structure Libraries and Algorithms implementation

Algorithms

Data Structure Libraries and Algorithms implementation in C++

Disclaimer
This repository is meant to be used as a reference to learn data structure and algorithm.

Algorithms in Other Languages

  • C
  • C++
  • Golang

Data structure

  • Array
    • Find duplicates in array
    • Largest Rectangle in Histogram
    • Largest Sum of Contiguous subarray within an array
    • Inplace array reversal
  • AVL Tree
  • Binary Search Tree
    • BFS Traversal
    • Compare two BST
    • DFS Traversal
    • Is BST?
    • Lowest Common Ancestor
  • Binary Tree
    • Depth First Traversal
    • Level Order Traversal
    • Lowest Common Ancestor
    • Top View
    • Vertical Order Traversal
  • Deque
  • Dynamic Connectivity
    • Quick Find
    • Quick Union
    • Weighted Quick Union
  • Graph
    • Bellman Ford Algorithm
    • Breadth First Search
    • Connected Componenets
    • Depth First Search
    • Dijkstra Algorithm
    • Kosaraju Algorithm
    • Kruskal Algorithm
    • Prim Algorithm
    • Topological Sort
  • Hash Table
    • Linear Probing
    • Separate Chaining
  • Linked List
    • Singly Linked List
      • Find Middle Node
      • Is Palindrome?
      • Merge Two Sorted Linked List
      • Node Swap
      • Remove duplicates from Singly Linked List
      • Return nth element from last node
      • Reverse Singly Linked List
      • Rotate
      • Sum of two lists
    • Doubly Linked List
      • Remove duplicates from Doubly Linked List
      • Reverse Doubly Linked List
    • Circular Linked List
      • Is Circular?
      • Josephus Circle
      • Split Circular Lists
  • Miscellaneous
    • Anagram
    • Integer Reversion
    • Palindrome Check
  • Priority Queue/Binary Heap
    • Min Heap
    • Max Heap
  • Queue
  • Red Black Tree
  • Binary Search
  • Shuffle using Fisher-Yates (Knuth) shuffling algorithm
  • Sorting Algorithms
    • Bubble Sort
    • Gnome Sort
    • Insertion Sort
    • Merge Sort
    • Odd Even Sort
    • Quick Sort
    • Selection Sort
    • Shell Sort
  • Stack
    • Balanced Paranthesis
    • Track Current Minimum
    • Integer to Binary
    • Queue using Stack
    • Two Stack in an Array
  • Ternary Search Tries
  • Tree
  • Trie

TO DO

  • Vertical Order Traversal of Tree
  • Order Statistics of Tree
  • Red Black Tree
  • Deque using circular array
  • Tree Varient
  • Graph Varient
  • cocktail sort
  • comb sort

Contribution

Feel Free to contribute.
Please follow standard C++ Guidelines.