-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
35 lines (31 loc) · 1.04 KB
/
Main.java
File metadata and controls
35 lines (31 loc) · 1.04 KB
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
public class Main
{
public static void main(String[] args)
{
LinkedList l = new LinkedList();
l.addToFront(new ListNode(3));
l.printList();
l.addToFront(new ListNode(5));
l.printList();
ListNode newNode = l.removeFromFront();
l.printList();
System.out.printf("newNode: %d\n", newNode.getValue());
LinkedList p = new LinkedList();
p.addToFront(new ListNode(7));
p.printList();
p.addToFront(new ListNode(2));
p.printList();
FibNode f = new FibNode(0);
f.getCurrentLevel().printList();
FibHeap h = new FibHeap();
h.insert(f);
h.getRootList().printList();
System.out.printf("Min so far: %d\n", h.getMin().getValue());
h.insert(new FibNode(10));
h.getRootList().printList();
System.out.printf("Min so far: %d\n", h.getMin().getValue());
h.insert(new FibNode(-1));
h.getRootList().printList();
System.out.printf("Min so far: %d\n", h.getMin().getValue());
}
}