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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuickSelect #163

Closed
wants to merge 6 commits into from
Closed

QuickSelect #163

wants to merge 6 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 9, 2020

resolving issue #6

implement QuickSelect
implement test case
@williamfiset
Copy link
Owner

Thanks, I'm not super familiar with the Quick Select algorithm. I'll read up on it and get back to you.

import org.junit.Test;

public class QuickSelectTest {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test which fully tests the functionality of your quickselect implementation? I'm thinking of something like:

  1. Generate a range array of 100 random ints
  2. Make a sorted copy of the generated array
  3. Use the quick select algorithm to find the k'th smallest elements for all values of k between 1 and n.
  4. Make sure the quick select algorithm found the k'th smallest element by checking the k'th element in the sorted array

add header with description
kth smallest instead of largest
Update Test to match Quickselect
@williamfiset williamfiset mentioned this pull request Oct 1, 2020
@ghost ghost closed this Oct 20, 2020
This pull request was closed.
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

Successfully merging this pull request may close these issues.

None yet

2 participants