Skip to content

Commit 14667d4

Browse files
author
Hamdullah shah
committed
modified percentage
Make it same as explanation, i.e at least 50 elements and 0.25 percent.
1 parent e3c921b commit 14667d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Queue/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public struct Queue<T> {
158158
head += 1
159159

160160
let percentage = Double(head)/Double(array.count)
161-
if head > 20 && percentage > 0.25 {
161+
if array.count > 50 && percentage > 0.25 {
162162
array.removeFirst(head)
163163
head = 0
164164
}

0 commit comments

Comments
 (0)