Skip to content

Buggy solution for Section Arrays #3 #4

Description

@shresthas

Hi,

The solution provided is buggy. Try {10 8 4 6 5} to see it.

An alternative solution is actually quite simple.

  1. sort the array.
  2. return the largest n entries.

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