Permalink
Browse files

Change access modifier in RandomizedQueue.java

  • Loading branch information...
1 parent 6a0a368 commit d7701521ad97a03ff237b565d05d9095dee8c5df Jakk.Wong@gmail.com committed Sep 6, 2012
Showing with 2 additions and 3 deletions.
  1. +0 −1 HW2/Deque.java
  2. +2 −2 HW2/RandomizedQueue.java
View
@@ -4,7 +4,6 @@
private int N; // Size of deque.
private Node pre, post; // References to sentinels of deque.
-
// Deque utilizes doubly linked-list.
private class Node {
private Item item;
View
@@ -1,7 +1,7 @@
import java.util.Iterator;
public class RandomizedQueue<Item> implements Iterable<Item> {
- public Item[] a; // Array of items.
+ private Item[] a; // Array of items.
private int N; // Size of randomized queue.
// Initializes an empty queue.
@@ -62,7 +62,7 @@ public Item sample() {
}
// Implementation of iterator object.
- public class RQIterator implements Iterator<Item> {
+ private class RQIterator implements Iterator<Item> {
private int i = N;
private Item[] copy;

0 comments on commit d770152

Please sign in to comment.