Skip to content

Conversation

@Owais28
Copy link
Contributor

@Owais28 Owais28 commented Sep 24, 2022

Describe your change:

  • Add an algorithm

>
> ### Describe your change:
> * [x]  Add an algorithm?
> * [ ]  Fix a bug or typo in an existing algorithm?
> * [ ]  Documentation change?
>
> ### Checklist:
> * [x]  I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Javascript/blob/master/CONTRIBUTING.md).
> * [x]  This pull request is all my own work -- I have not plagiarized.
> * [x]  I know that pull requests will not be merged if they fail the automated tests.
> * [x]  This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
> * [x]  All new JavaScript files are placed inside an existing directory.
> * [x]  All filenames should use the UpperCamelCase (PascalCase) style. There should be no spaces in filenames.
>   **Example:**`UserProfile.js` is allowed but `userprofile.js`,`Userprofile.js`,`user-Profile.js`,`userProfile.js` are not
> * [x]  All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
> * [x]  If this pull request resolves one or more open issues then the commit message contains `Fixes: #{$ISSUE_NO}`.
@Owais28 Owais28 changed the title algorithm : Added Quick Select algorithm #6 algorithm : Added Quick Select algorithm Sep 24, 2022
@Panquesito7 Panquesito7 added the enhancement New feature or request label Sep 25, 2022

const QuickSelect = (items: Array<number>, kth: number): number => {
// eslint-disable-line no-unused-vars
if (kth < 1 || kth > items.length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider making kth 0-based for consistency with JS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

help needed

@appgurueu
Copy link
Contributor

appgurueu commented Sep 25, 2022

Please keep the Abs out of this PR. There already is plenty of noise due to the tooling (which should be added along with a CI in a separate PR).

@Owais28
Copy link
Contributor Author

Owais28 commented Sep 26, 2022

I have reverted the previous commit (17b48fd)

@Owais28 Owais28 closed this Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants