Java-Templates-Algorithms icon indicating copy to clipboard operation
Java-Templates-Algorithms copied to clipboard

Compilation of all the Java Algorithms, Datastrutures, Dynamic Programming, and Graph Theory templates that I currently know of

Java Template and Algorrithms

Compilation of all the Java Algorithms, Datastrutures, Dynamic Programming, and Graph Theory templates that I currently know of

Under the Java_Templates_Algorithms, you will find my Java template Algorithms to various types of questions (e.g. 0-1 Knapsack, which uses dp). The Algorithms are organized under the type of algorithm they use (Dp, Graph, etc...)

Algorithm sets are organized into different folders

Algorithms

  • Array Rotation
  • Backtracking
  • Binary Search
  • Closest Two Points
  • Count Inversions
  • Cycle Detection (Brent and Floyd)
  • Majority
  • Meet In The Middle
  • Permutation Index
  • Sort
  • Ternary Search
  • Two Sat & an example

Datastructures

  • Arne Andersson Tree
  • Adelson-Velskii and Landis Tree
  • BTree
  • Binary Heap (EXTENDED)
  • Binary Indexed Tree (2D)
  • Deque
  • Difference Array (2D)
  • HashMap
  • Implicit Segment Tree
  • Implicit Treap
  • Interval Tree
  • KdTree
  • Link Cut Tree
  • Merge Tree
  • MinQueue
  • Peristent Binary Search Tree
  • Persistent Linked List
  • Persistent Segment Tree
  • Prefix Sum (2D)
  • Quad Tree
  • Randomized Queue
  • Range Tree
  • Red Black Tree
  • Segment Tree (recursive and non-recursive)
  • Size Balanced Tree
  • Skip List
  • Sparse Table
  • Splay Tree (complex and simple)
  • Treap (complex and simple)
  • Union Find

Dynamic Programming

  • Binomial Coefficients
  • Catalan Numbers
  • Coin Chang
  • Divide and Conquer
  • Domino Fill
  • Edit Distance
  • Egg Dropping
  • Hamming Sequence
  • 0-1 Knapsack
  • LCS (subsequence and substring)
  • LIS
  • Maximal Zero Submatrix
  • Maximum Subarray
  • Minimum Cost Triangulation
  • Minimum Matrix Chin Multiplication
  • Shortest Hamiliton Cycle & Path

Graph Theory

  • Bron Kerbsch
  • Centers
  • DFS Biconnected Components
  • DFS Bipartite
  • DFS Cycle Detection
  • DFS Eulerian
  • DFS Topological Sorting
  • LCA DP
  • LCA Euler
  • LCA HLd
  • Rooted Treelsome Morphism
  • Strongly Connected Components Ksaruju
  • Strongly Connected Components Tarjan
  • Topological Sorting (Simple edition)