Skip to content

7.1 - 2: Code partitions array incorrectly. #345

Description

@HialeahLiam

Test input: items = [5,5,5,5,4,5,5,5]
partition(items, 0, 7) returns 4 and modifies list to [5, 5, 5, 5, 4, 5, 5, 5].

q = 4, which fails A[p...q-1] <= q <= A[q+1 ... r]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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