A Java project with implementation of popular data structures and algorithms. I will try to update it as often as possible, feel free to fork and improve it.
- Bubble Sort
- Insertion Sort - The insertion sort algorithm consists of insertions of items and comparisions with his previous items. Relatively close to BubbleSort, this algorithm has a worse case order of O(n2) taking into account that only one element is switched per iteration
- Selection Sort
- Merge Sort
- Array Based Stack - Each method runs in a constant time O(1). The space usage is O(N) where N is the size of the array, independent of the number n of elements.
- Singly Linked List Stack - Different from an array based Stack, the singly linked list Stack has memory usage proportional to the number of actual elements currently in the stack. This is a best choice when the final number of elements in the stack is not known.
It is a "mavenized" project, but his pom.xml file only contains a dependency for Junit.