Data Structures and Algorithms in Java
Trying out various DS and Algorithms for learning purposes and to refresh my Java skills.
All with their corresponding tests. Go to tests root directory
Data Structures:
- Prefix Tree (Trie)
- Singly Linked List
- Stack
- Queue
- Dynamic Array
- Multi Stack in Array
- HashTable
- Binary Search Tree
- Undirected Graph
- Priority Queue using min-heap
Algorithms:
Trees
- Build a minimum height tree from an unsorted/sorted array
- Build list of lists that each contain the tree nodes per height level
- Check if tree is BST
- Find the in-order successor of a node in a tree
- Recursively calculate height and balance of tree in one pass
- Autocomplete a word using a Trie
Arrays
Stacks and Queues
Sorting
Strings
- String has unique characters
- Check if string is permutation of another
- URLify string
- Reverse string
- Check if string is permutation of a palindrome
- Check if string is palindrome
- String sanitizer
- Check if strings have more than one edit
- Basic string compression