Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e596644

Browse files
Fixed the Queue grow method comment about resizing
1 parent f0639aa commit e596644

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/com/jwetherell/algorithms/data_structures/Queue.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private boolean remove(int index) {
111111
return true;
112112
}
113113

114-
// Grow the array by 50% and rearrange to make sequential
114+
// Triple the size of the underlying array and rearrange to make sequential
115115
private void grow(int size) {
116116
int growSize = (size + (size<<1));
117117
T[] temp = (T[]) new Object[growSize];

‎test/com/jwetherell/algorithms/data_structures/test/QueueTests.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class QueueTests {
1616

1717
@Test
1818
public void testArrayQueue() {
19-
TestData data = Utils.generateTestData(100);
19+
TestData data = Utils.generateTestData(100000);
2020

2121
String aName = "Queue [array]";
2222
Queue.ArrayQueue<Integer> aQueue = new Queue.ArrayQueue<Integer>();

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /