Introduce data structures to work with
This commit is contained in:
5
src/aud/exam/prep/array/FullyUsedArray.java
Normal file
5
src/aud/exam/prep/array/FullyUsedArray.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package aud.exam.prep.array;
|
||||||
|
|
||||||
|
public class FullyUsedArray<T> {
|
||||||
|
public T[] theArray;
|
||||||
|
}
|
6
src/aud/exam/prep/array/PartiallyUsedArray.java
Normal file
6
src/aud/exam/prep/array/PartiallyUsedArray.java
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package aud.exam.prep.array;
|
||||||
|
|
||||||
|
public class PartiallyUsedArray<T> {
|
||||||
|
public T[] theArray;
|
||||||
|
public int numberOfUsedSlots;
|
||||||
|
}
|
7
src/aud/exam/prep/list/DoubleListItem.java
Normal file
7
src/aud/exam/prep/list/DoubleListItem.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package aud.exam.prep.list;
|
||||||
|
|
||||||
|
public class DoubleListItem<T> {
|
||||||
|
public T key;
|
||||||
|
public DoubleListItem<T> next;
|
||||||
|
public DoubleListItem<T> prev;
|
||||||
|
}
|
6
src/aud/exam/prep/list/SingleListItem.java
Normal file
6
src/aud/exam/prep/list/SingleListItem.java
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package aud.exam.prep.list;
|
||||||
|
|
||||||
|
public class SingleListItem<T> {
|
||||||
|
public T key;
|
||||||
|
public SingleListItem<T> next;
|
||||||
|
}
|
7
src/aud/exam/prep/tree/BinaryTreeNode.java
Normal file
7
src/aud/exam/prep/tree/BinaryTreeNode.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package aud.exam.prep.tree;
|
||||||
|
|
||||||
|
public class BinaryTreeNode<T> {
|
||||||
|
public T key;
|
||||||
|
public BinaryTreeNode<T> left;
|
||||||
|
public BinaryTreeNode<T> right;
|
||||||
|
}
|
7
src/aud/exam/prep/tree/MutliWayTreeNode.java
Normal file
7
src/aud/exam/prep/tree/MutliWayTreeNode.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package aud.exam.prep.tree;
|
||||||
|
|
||||||
|
public class MutliWayTreeNode<T> {
|
||||||
|
public T[] theKeys;
|
||||||
|
public MutliWayTreeNode<T>[] theSuccessors;
|
||||||
|
public int numberOfKeys;
|
||||||
|
}
|
9
src/aud/exam/prep/tree/TernaryTreeNode.java
Normal file
9
src/aud/exam/prep/tree/TernaryTreeNode.java
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package aud.exam.prep.tree;
|
||||||
|
|
||||||
|
public class TernaryTreeNode<T> {
|
||||||
|
public T key1;
|
||||||
|
public T key2;
|
||||||
|
public TernaryTreeNode<T> left;
|
||||||
|
public TernaryTreeNode<T> middle;
|
||||||
|
public TernaryTreeNode<T> right;
|
||||||
|
}
|
Reference in New Issue
Block a user