Skip to content

Commit cf1ebd9

Browse files
author
Justin Wetherell
committed
Moved the interfaces into their own package
1 parent 362eee0 commit cf1ebd9

33 files changed

+46
-16
lines changed

src/com/jwetherell/algorithms/data_structures/BTree.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import java.util.Comparator;
66
import java.util.Deque;
77

8+
import com.jwetherell.algorithms.data_structures.interfaces.ITree;
9+
810
/**
911
* B-tree is a tree data structure that keeps data sorted and allows searches,
1012
* sequential access, insertions, and deletions in logarithmic time. The B-tree

src/com/jwetherell/algorithms/data_structures/BinaryHeap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import java.util.Deque;
77
import java.util.List;
88

9+
import com.jwetherell.algorithms.data_structures.interfaces.IHeap;
10+
911
/**
1012
* A binary heap is a heap data structure created using a binary tree. It can be
1113
* seen as a binary tree with two additional constraints: 1) The shape property:

src/com/jwetherell/algorithms/data_structures/BinarySearchTree.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import java.util.Queue;
1010
import java.util.Set;
1111

12+
import com.jwetherell.algorithms.data_structures.interfaces.ITree;
13+
1214
/**
1315
* A binary search tree (BST), which may sometimes also be called an ordered or
1416
* sorted binary tree, is a node-based binary tree data structure which has the

src/com/jwetherell/algorithms/data_structures/HashArrayMappedTrie.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import java.util.List;
55
import java.util.Map;
66

7+
import com.jwetherell.algorithms.data_structures.interfaces.IMap;
8+
79
/**
810
* A hash array mapped trie (HAMT) is an implementation of an associative
911
* array that combines the characteristics of a hash table and an array mapped

src/com/jwetherell/algorithms/data_structures/HashMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import java.util.LinkedList;
44
import java.util.List;
55

6+
import com.jwetherell.algorithms.data_structures.interfaces.IMap;
7+
68
/**
79
* Hash Map backed by an array of ArrayLists. hash map is a data structure that
810
* uses a hash function to map identifying values, known as keys, to their

src/com/jwetherell/algorithms/data_structures/List.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.Arrays;
44

5+
import com.jwetherell.algorithms.data_structures.interfaces.IList;
6+
57
@SuppressWarnings("unchecked")
68
public interface List<T> extends IList<T> {
79

src/com/jwetherell/algorithms/data_structures/PatriciaTrie.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.Arrays;
44

5+
import com.jwetherell.algorithms.data_structures.interfaces.ITree;
6+
57
/**
68
* A Patricia trie (radix tree) is a space-optimized trie data structure where each
79
* non-terminating (black) node with only one child is merged with its child.

src/com/jwetherell/algorithms/data_structures/Queue.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.jwetherell.algorithms.data_structures;
22

3+
import com.jwetherell.algorithms.data_structures.interfaces.IQueue;
4+
35
@SuppressWarnings("unchecked")
46
public interface Queue<T> extends IQueue<T> {
57

src/com/jwetherell/algorithms/data_structures/RadixTrie.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.jwetherell.algorithms.data_structures;
22

3+
import com.jwetherell.algorithms.data_structures.interfaces.IMap;
4+
35
/**
46
* A radix trie or radix tree is a space-optimized trie data structure where
57
* each node with only one child is merged with its child. The result is that

src/com/jwetherell/algorithms/data_structures/SkipList.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.Random;
44

5+
import com.jwetherell.algorithms.data_structures.interfaces.ISet;
6+
57
/**
68
* Skip List. A skip list is a data structure for storing a sorted list of items
79
* using a hierarchy of linked lists that connect increasingly sparse

0 commit comments

Comments
 (0)