This repository contains demo implementations of several classical algorithms in Java.
- Sorting
- Hash Table
- Tree & Graph
- Binary Search Tree (Regular)
- Trie
- 0-1 Knapsack
- Folder: sorting
- Description: Bubble Sort, Selection Sort, Insertion Sort, Quick Sort, Merge Sort, Heap Sort
- Test Codes: Main.java
- Folder: hashtable
- Description: Demo implementation of a hash table using arrays
- Major Operations: add a new item, get an existing item, remove an existing item
- Test Codes: Main.java
- Folder: tree-graph
- Description: Demo implementation of trees (binary and N-ary) and graphs using adjacency list
- Major Operations: Binary Tree (preorder/inorder/postorder tree walk), N-ary Tree (postorder/DFS/BFS tree walk), Graph (DFS/BFS traversal, graph reversal)
- Test Codes: Main.java
- Folder: bst
- Description: Demo implementation of regular binary search tree
- Major Operations: existence check, add a new item, remove an existing item, successor, predecessor, inorder tree walk
- Test Codes: Main.java
- Folder: trie
- Description: Demo implementation of a trie
- Major Operations: add a new word, find a word, remove a word, trie traversal
- Test Codes: Main.java
- Folder: knapsack
- Description: Solution ot 0-1 knapsack problem
- Test Codes: Main.java