aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-12-06 11:13:31 -0600
committerRossTheRoss <msattr@gmail.com>2019-12-06 11:13:31 -0600
commit85db5115ccc88c49d1117a6d2c72c3e25dddf342 (patch)
tree48b762ae6ad43109e241aa16c1e249f28c6c8fe6 /csci1913
parentFinish lab 12 (diff)
downloadhomework-85db5115ccc88c49d1117a6d2c72c3e25dddf342.tar
homework-85db5115ccc88c49d1117a6d2c72c3e25dddf342.tar.gz
homework-85db5115ccc88c49d1117a6d2c72c3e25dddf342.tar.bz2
homework-85db5115ccc88c49d1117a6d2c72c3e25dddf342.tar.lz
homework-85db5115ccc88c49d1117a6d2c72c3e25dddf342.tar.xz
homework-85db5115ccc88c49d1117a6d2c72c3e25dddf342.tar.zst
homework-85db5115ccc88c49d1117a6d2c72c3e25dddf342.zip
Finish lab again
Diffstat (limited to '')
-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.