Skip to content

Commit 506dbcf

Browse files
committed
Changed right to left
1 parent d5d3832 commit 506dbcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Ordered Set/OrderedSet.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public struct OrderedSet<T: Comparable> {
8282

8383
j = mid
8484

85-
// check right side of mid
85+
// check left side of mid
8686
while j > 0 && !(internalSet[j] < internalSet[j - 1]) {
8787
if internalSet[j - 1] == item {
8888
return j - 1
@@ -125,4 +125,4 @@ public struct OrderedSet<T: Comparable> {
125125
public func kSmallest(k: Int) -> T! {
126126
return k > count || k <= 0 ? nil : internalSet[k - 1]
127127
}
128-
}
128+
}

0 commit comments

Comments
 (0)