Skip to content

Commit c18e940

Browse files
committed
insertionSort() algorithm update..
- fixed incorrect values being printed / compared for insertionSort
1 parent 34dd23d commit c18e940

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

Source/Factories/Sorting.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public class Sorting {
115115

116116
for var secondaryIndex = primaryIndex; secondaryIndex > -1; secondaryIndex-- {
117117

118-
print("comparing \(key) and \(numberList[secondaryIndex])")
118+
print("comparing \(key) and \(output[secondaryIndex])")
119119

120120
if key < output[secondaryIndex] {
121121

@@ -158,7 +158,7 @@ public class Sorting {
158158

159159
for var secondaryIndex = primaryIndex; secondaryIndex > -1; secondaryIndex-- {
160160

161-
print("comparing \(key) and \(sequence[secondaryIndex])")
161+
print("comparing \(key) and \(output[secondaryIndex])")
162162

163163
if key < output[secondaryIndex] {
164164

SwiftStructures.xcodeproj/xcuserdata/waynebishop.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,21 @@
147147
</Locations>
148148
</BreakpointContent>
149149
</BreakpointProxy>
150+
<BreakpointProxy
151+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
152+
<BreakpointContent
153+
shouldBeEnabled = "No"
154+
ignoreCount = "0"
155+
continueAfterRunningActions = "No"
156+
filePath = "Source/Factories/Sorting.swift"
157+
timestampString = "479343308.067372"
158+
startingColumnNumber = "9223372036854775807"
159+
endingColumnNumber = "9223372036854775807"
160+
startingLineNumber = "118"
161+
endingLineNumber = "118"
162+
landmarkName = "insertionSort(_:)"
163+
landmarkType = "5">
164+
</BreakpointContent>
165+
</BreakpointProxy>
150166
</Breakpoints>
151167
</Bucket>

0 commit comments

Comments
 (0)