A focused Java workspace for practicing data structures and algorithms for coding interviews.
.
├─ README.md
└─ src
├─ main
│ └─ java
│ └─ com/podopryhora/algoworkout
│ ├─ App.java
│ ├─ algorithms
│ ├─ ds
│ └─ leetcode
└─ test
└─ java
└─ com/podopryhora/algoworkout
Run tests with the Gradle wrapper:
./gradlew test
- Arrays (custom dynamic array)
- Singly linked list
- Doubly linked list
- Stack (array + linked list)
- Queue (array + linked list)
- Blocking queue (array + lock)
- Deque
- Hash map
- Hash table (separate chaining)
- Hash table (open addressing)
- Binary heap (min/max)
- Binary search tree
- AVL tree
- Red-black tree
- Trie
- Disjoint set (union-find)
- Graph (adjacency list/matrix)
- Linear search
- Binary search
- Two pointers patterns
- Sliding window
- Fixed window
- Prefix sum
- Sorting: bubble, selection, insertion
- Sorting: merge, quick, heap
- Bit manipulation basics
- Recursion patterns
- LRU cache
- Backtracking: subsets, permutations, combinations
- Token Bucket Algorithm
- Leaky Bucket Algorithm
- Greedy: interval scheduling, activity selection
- BFS / DFS
- Topological sort
- Shortest path: Dijkstra, Bellman-Ford
- Minimum spanning tree: Kruskal, Prim
- Dynamic programming: 1D (fib, house robber)
- Dynamic programming: 2D (knapsack, LCS)
- String algorithms: KMP, Rabin-Karp
- Advanced: segment tree, Fenwick tree
- Two Sum
- Palindrome Number
- Fizz Buzz
- Array Shuffle
- Max Consecutive Ones
- Valid Palindrome
- Best Time to Buy and Sell Stock
- Longest Palindromic Substring
- Add Two Numbers
- Three Sum
- Longest Substring Without Repeating Characters
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock IV
- Best Time to Buy and Sell Stock with Cooldown
LinearSearchlives insrc/main/java/com/podopryhora/algoworkout/algorithms/search/LinearSearch.java- Tests live in
src/test/java/com/podopryhora/algoworkout/algorithms/search/LinearSearchTest.java