Skip to content

Commit 725ff85

Browse files
authored
Merge pull request kodecocodes#862 from bbvch13531/master
Fix wrong description and typo.
2 parents deae79c + 8a6d99a commit 725ff85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Insertion Sort/InsertionSort.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func insertionSort<T>(_ array: [T], _ isOrderedBefore: (T, T) -> Bool) -> [T] {
2222

2323
/// Performs the Insertion sort algorithm to a given array
2424
///
25-
/// - Parameter array: the array to be sorted, conatining elements that conform to the Comparable protocol
25+
/// - Parameter array: the array to be sorted, containing elements that conform to the Comparable protocol
2626
/// - Returns: a sorted array containing the same elements
2727
func insertionSort<T: Comparable>(_ array: [T]) -> [T] {
2828
guard array.count > 1 else { return array }

Linked List/LinkedList.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public final class LinkedList<T> {
6767
/// - Returns: LinkedListNode
6868
public func node(at index: Int) -> Node {
6969
assert(head != nil, "List is empty")
70-
assert(index >= 0, "index must be greater than 0")
70+
assert(index >= 0, "index must be greater or equal to 0")
7171

7272
if index == 0 {
7373
return head!

0 commit comments

Comments
 (0)