forked from xnkasy/Assignment123COL106Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA1List.java
55 lines (40 loc) · 1.04 KB
/
A1List.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Implements Dictionary using Doubly Linked List (DLL)
// Implement the following functions using the specifications provided in the class List
public class A1List extends List {
private A1List next; // Next Node
private A1List prev; // Previous Node
public A1List(int address, int size, int key) {
super(address, size, key);
}
public A1List(){
super(-1,-1,-1);
// This acts as a head Sentinel
A1List tailSentinel = new A1List(-1,-1,-1); // Intiate the tail sentinel
this.next = tailSentinel;
tailSentinel.prev = this;
}
public A1List Insert(int address, int size, int key)
{
return null;
}
public boolean Delete(Dictionary d)
{
return false;
}
public A1List Find(int k, boolean exact)
{
return null;
}
public A1List getFirst()
{
return null;
}
public A1List getNext()
{
return null;
}
public boolean sanity()
{
return true;
}
}