This project contains a good collection of Java programs with unit tests for reference.
- Atomic Counter
- Cyclic Barrier
- Blocking Queue Implementation - with and without Lock
- Executor Service - Single Thread and Fixed Thread Pool
- CountDownLatch
- Locks Implementation - Reentrant, Reentrant Read-write, Stamped
- ConcurrentHashMap
- Semaphore
- Thread APIs & ThreadLocal
- Concurrency Problems - Dining Philosophers, Producer Consumer
- Armstrong Number
- Combination
- Disible by N
- Factorial
- Fibonacci
- Greatest Common Divisor
- Highest Power of 2 that is less than or equal to N
- Krishnamurthy Number
- Permutation
- Pronic Number
- Square Root Finder
- Array Rotation
- Binary Heap Array
- Duplicate Number
- Frequency Counter
- Maximum Repeating Number
- Median of Sorted Arrays
- Minimum Swaps
- Missing Number
- Move Elements to end
- Next Greatest Element
- Odd Occurrence Element
- Pair with given sum
- Shuffle cards
- Sorted Squares
- Subarray Problems
- Coloring Problem
- Hamiltonian Path
- Knights Tour
- Maze Problem
- N Queens Problem
- Subset Sum
- Sudoku
- Simple Algorithms using Bitwise Operators
- First Repeated character finder
- Lonely integer
- Unique character string checker
- LFU Cache Simulation
- LRU Cache Simulation
- Caesar Cipher
- Cutting Rod Problem
- Edit Distance
- Egg Dropping Problem
- Knapsack Problem
- Longest Common Subsequence
- Longest Increasing Subsequence
- Staircase Problem
- Day Finder
- Palindrome Prime
- Prime Numbers
- Roman Numeral Finder
- Set Bits Counter
- Clock Angle Finder
- Line Intersection
- Orientation
- Overlapping Rectangles
- Point inside Polygon checker
- Rectangle into Squares
- Connected graph
- Farthest node finder
- Check for cycle
- Graph Traversal
- Minimum Spanning Tree
- Undirected graph
- Majority Element
- Min Heap
- Max Heap
- Cycle Detecter
- Duplicate remover
- Flatten Linked list
- Reverse Linked list
- Linked list subset
- Merge sort
- Delete middle node
- Singly Linked list Palindrome
- Difference in Diagonals
- Find Island
- Find maximum length path
- Coin Change Problem
- Staircase Problem
- Knuth Morris Pratt method
- Naive method
- Priority Queue Median Finder
- Josephus Problem
- Staircase Problem
- Print String Permutation
- Tower of Hanoi Problem
- Remove duplicate words
- General regex
- IP Address
- XML tag matcher
- Binary Search
- Interpolation Search
- Linear Search
- Saddleback Search
- Sorted Rotated Array Search
- Ternary Search
- Find kth largest element
- Find kth smallest element
- Quick Select
- Secretary Problem
- Bogo Sort
- Bubble Sort
- Bucket Sort
- Cocktail Shaker Sort
- Comb Sort
- Counting Sort
- Cycle Sort
- Gnome Sort
- Heap Sort
- Insertion Sort
- Merge Sort
- Pancake Sort
- Pigeon Hole Sort
- Quick Sort
- Radix Sort
- Selection Sort
- Shell Sort