Skip to content

Commit

Permalink
Merge pull request kodecocodes#862 from bbvch13531/master
Browse files Browse the repository at this point in the history
Fix wrong description and typo.
  • Loading branch information
richard-ash authored Feb 25, 2019
2 parents deae79c + 8a6d99a commit 725ff85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Insertion Sort/InsertionSort.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func insertionSort<T>(_ array: [T], _ isOrderedBefore: (T, T) -> Bool) -> [T] {

/// Performs the Insertion sort algorithm to a given array
///
/// - Parameter array: the array to be sorted, conatining elements that conform to the Comparable protocol
/// - Parameter array: the array to be sorted, containing elements that conform to the Comparable protocol
/// - Returns: a sorted array containing the same elements
func insertionSort<T: Comparable>(_ array: [T]) -> [T] {
guard array.count > 1 else { return array }
Expand Down
2 changes: 1 addition & 1 deletion Linked List/LinkedList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public final class LinkedList<T> {
/// - Returns: LinkedListNode
public func node(at index: Int) -> Node {
assert(head != nil, "List is empty")
assert(index >= 0, "index must be greater than 0")
assert(index >= 0, "index must be greater or equal to 0")

if index == 0 {
return head!
Expand Down

0 comments on commit 725ff85

Please sign in to comment.