Skip to content

Corrections #1

Open
Open
@jarvis-wu

Description

@jarvis-wu

Hi there, found a couple of errata while going through the gitbook:

In line 5 of the Binary Tree > Mergesort code snippet, the condition if nums.isEmpty causes infinite loops and should be replaced with if nums.count <= 1.

In line 13 of the Binary Tree > Quicksort code snippet, the parameters of quickSort() should be &nums, start, pivot - 1 instead of &nums, 0, pivot - 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions