Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement quick sort. #4

Open
8igMac opened this issue Oct 24, 2021 · 0 comments
Open

Implement quick sort. #4

8igMac opened this issue Oct 24, 2021 · 0 comments

Comments

@8igMac
Copy link
Owner

8igMac commented Oct 24, 2021

Requirement

  • Implement quick sort that sort the a list of int from small to large.
  • Create your own test (at least 3 test case, you know the reason. 馃槃 )
  • Hint: Use the built-in type List<int>, but don't use List.sort 馃槄 .

function signiture

List<int> qsort(List<int> list) {
  // todo
  return list;
}

test example

void main() {
  test('Quick sort', () {
    expect(qsort([3, 2, 1]), [1, 2, 3]);
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant