This repository contains my implementations of some important Data Structures and Algorithms in Java (see the list below). The idea here was to keep the code for the algorithms as simple as possible, so I didn't implement it with OO design principles in mind (don't try this at home, folks!). Each implementation has its unit tests under src/test/java/com/jorgeacetozi/algorithms
. Have fun!
- Binary Search
- Binary Search Tree
- Breadth First Search
- Cache: LRU and LFU
- Connectivity in Graphs
- Cycle Detection in Graphs
- Depth First Search
- Dijkstra's Algorithm (Shortest Path from a Single Source)
- Doubly Linked List
- Hash: Chaining and Linear Probing
- Heap and Indexed Heap
- Prim's Algorithm (Minimum Spanning Tree)
- Queue: LinkedList and Circular Array implementations
- Quickselect
- Singly Linked List
- Sorting: Heapsort and Quicksort
- Stack: Static Array, Singly Linked List, and Dynamic Array implementations
- Ternary Search Tree
- Topological Sort