Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anthonynsimon/java-ds-algorithms

Data Structures and Algorithms in Java
https://github.com/anthonynsimon/java-ds-algorithms

algorithm dijkstra graph hash-map java matrix palindrome permutation sort stack strings tree trie

Last synced: 3 months ago
JSON representation

Data Structures and Algorithms in Java

Awesome Lists containing this project

README

        

# Data Structures and Algorithms in Java
[![Build Status](https://travis-ci.org/anthonynsimon/java-ds-algorithms.svg?branch=master)](https://travis-ci.org/anthonynsimon/java-ds-algorithms)
[![Test Coverage](https://codecov.io/gh/anthonynsimon/java-ds-algorithms/branch/master/graph/badge.svg)](https://codecov.io/gh/anthonynsimon/java-ds-algorithms)

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](/src/test/java/com/anthonynsimon/)

## Data Structures:
- [Prefix Tree (Trie)](/src/main/java/com/anthonynsimon/datastructures/Trie.java)
- [Singly Linked List](/src/main/java/com/anthonynsimon/datastructures/LinkedList.java)
- [Stack](/src/main/java/com/anthonynsimon/datastructures/Stack.java)
- [Queue](/src/main/java/com/anthonynsimon/datastructures/Queue.java)
- [Dynamic Array](/src/main/java/com/anthonynsimon/datastructures/DynamicArray.java)
- [Multi Stack in Array](/src/main/java/com/anthonynsimon/datastructures/MultiStackArray.java)
- [HashTable](/src/main/java/com/anthonynsimon/datastructures/HashTable.java)
- [Binary Search Tree](/src/main/java/com/anthonynsimon/datastructures/BinarySearchTree.java)
- [Undirected Graph](/src/main/java/com/anthonynsimon/datastructures/Graph.java)
- [Priority Queue using min-heap](/src/main/java/com/anthonynsimon/datastructures/PriorityQueue.java)

## Algorithms:
### Trees
- [Build a minimum height tree from an unsorted/sorted array](/src/main/java/com/anthonynsimon/algorithms/trees/BuildMinHeightTree.java)
- [Build list of lists that each contain the tree nodes per height level](/src/main/java/com/anthonynsimon/algorithms/trees/BinaryTreeToLists.java)
- [Check if tree is BST](/src/main/java/com/anthonynsimon/algorithms/trees/CheckBst.java)
- [Find the in-order successor of a node in a tree](/src/main/java/com/anthonynsimon/algorithms/trees/SuccessorFinder.java)
- [Recursively calculate height and balance of tree in one pass](/src/main/java/com/anthonynsimon/algorithms/trees/CheckTreeBalance.java)
- [Autocomplete a word using a Trie](/src/main/java/com/anthonynsimon/algorithms/trees/WordAutocompletion.java)

### Arrays
- [In-place matrix rotation](/src/main/java/com/anthonynsimon/algorithms/arrays/MatrixRotation.java)
- [Nullify rows and columns in matrix](/src/main/java/com/anthonynsimon/algorithms/arrays/NullifyMatrix.java)

### Stacks and Queues
- [Find minimum value in Stack](/src/main/java/com/anthonynsimon/algorithms/stacksqueues/MinStack.java)
- [Stack of Stacks](/src/main/java/com/anthonynsimon/algorithms/stacksqueues/StackOfStacks.java)
- [Queue via Stacks](/src/main/java/com/anthonynsimon/algorithms/stacksqueues/QueueViaStacks.java)
- [Sort stack by using another stack](/src/main/java/com/anthonynsimon/algorithms/stacksqueues/StackSorter.java)

### Sorting
- [Quick Sort](/src/main/java/com/anthonynsimon/algorithms/sorts/QuickSort.java)
- [Merge Sort](/src/main/java/com/anthonynsimon/algorithms/sorts/MergeSort.java)
- [Bubble Sort](/src/main/java/com/anthonynsimon/algorithms/sorts/BubbleSort.java)

### Strings
- [String has unique characters](/src/main/java/com/anthonynsimon/algorithms/strings/UniqueCharacters.java)
- [Check if string is permutation of another](/src/main/java/com/anthonynsimon/algorithms/strings/PermutationMatch.java)
- [URLify string](/src/main/java/com/anthonynsimon/algorithms/strings/Urlifier.java)
- [Reverse string](/src/main/java/com/anthonynsimon/algorithms/strings/Reverser.java)
- [Check if string is permutation of a palindrome](/src/main/java/com/anthonynsimon/algorithms/strings/PermutationPalindrome.java)
- [Check if string is palindrome](/src/main/java/com/anthonynsimon/algorithms/strings/PalindromeChecker.java)
- [String sanitizer](/src/main/java/com/anthonynsimon/algorithms/strings/Sanitizer.java)
- [Check if strings have more than one edit](/src/main/java/com/anthonynsimon/algorithms/strings/DiffChecker.java)
- [Basic string compression](/src/main/java/com/anthonynsimon/algorithms/strings/StringCompressor.java)

### Linked Lists
- [Remove duplicate values](/src/main/java/com/anthonynsimon/algorithms/lists/RemoveListDuplicates.java)
- [Find a the start of a loop in a linked list](/src/main/java/com/anthonynsimon/algorithms/lists/ListLoopChecker.java)
- [Find Kth to last element (unknown list size)](/src/main/java/com/anthonynsimon/algorithms/lists/FindKthToLast.java)
- [Partition list in place](/src/main/java/com/anthonynsimon/algorithms/lists/PartitionList.java)
- [Check if list is palindrome](/src/main/java/com/anthonynsimon/algorithms/lists/ListPalindromeChecker.java)
- [Find intersection of two lists](/src/main/java/com/anthonynsimon/algorithms/lists/ListIntersection.java)