Skip to content

Commit 5012add

Browse files
committed
Merge pull request kodecocodes#86 from hamdullahshah/patch-1
Fixed the count condition
2 parents 6449a78 + 14667d4 commit 5012add

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)