aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913
diff options
context:
space:
mode:
Diffstat (limited to 'csci1913')
-rw-r--r--csci1913/Java/lab12_strap012.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/csci1913/Java/lab12_strap012.java b/csci1913/Java/lab12_strap012.java
index 3125395..351cc1c 100644
--- a/csci1913/Java/lab12_strap012.java
+++ b/csci1913/Java/lab12_strap012.java
@@ -17,7 +17,7 @@ class PriorityQueue<Base> {
root = new Node(null, -1); // root is the lone King of Kings
}
public boolean isEmpty() {
- return root.right==root.left;
+ return root.right == root.left;
}
public Base dequeue() {
@@ -52,11 +52,10 @@ class PriorityQueue<Base> {
lessOrEqual = false;
}
}
- if (lessOrEqual) {
+ if (lessOrEqual)
top.left = new Node(object, rank);
- } else {
+ else
top.right = new Node(object, rank);
- }
}
}
// SNOBBERY. How the aristocracy behaves in a queue. 20 points.