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

Merge sort #1066

Merged
merged 4 commits into from
Sep 27, 2020
Merged

Merge sort #1066

merged 4 commits into from
Sep 27, 2020

Conversation

Himalay12
Copy link
Contributor

@Himalay12 Himalay12 commented Aug 30, 2020

Description of Change

Here, I have shorten the code. There are three while loop used in merge function. Among which two of them can be replaced by adding a condition for if and while of first while loop. Now, the condition for while: (i < n1 || j < n2) and for if: (j>=n2 || (i < n1 && L[i]<R[j])).

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

@kvedala kvedala added the automated tests are failing Do not merge until tests pass label Aug 30, 2020
@Panquesito7 Panquesito7 added the Improvement improvement in previously written codes label Aug 31, 2020
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

Please fix clang-tidy warnings.

@Panquesito7 Panquesito7 added requested changes changes have been requested merge conflicts labels Sep 20, 2020
@Panquesito7
Copy link
Member

Rebase needed.

@Himalay12
Copy link
Contributor Author

Himalay12 commented Sep 22, 2020 via email

@Panquesito7
Copy link
Member

See the GitHub Documentation for how to resolve conflicts. 🙂

@Himalay12
Copy link
Contributor Author

Replaced two while loop by adding condition in if statement of first while loop of merging.

@Panquesito7 Panquesito7 removed automated tests are failing Do not merge until tests pass merge conflicts labels Sep 27, 2020
@Panquesito7
Copy link
Member

What is this PR about? Please add a brief description in the first post. Thanks.

@Himalay12
Copy link
Contributor Author

Himalay12 commented Sep 27, 2020 via email

@Himalay12
Copy link
Contributor Author

Here, I have shorten the code. There are three while loop used in merge function. Among which two of them can be replaced by adding a condition for if and while of first while loop. Now, the condition for while: (i < n1 || j < n2) and for if: (j>=n2 || (i < n1 && L[i]<R[j])).

Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

LGTM. 👍 😄

@Panquesito7 Panquesito7 added approved Approved; waiting for merge and removed requested changes changes have been requested labels Sep 27, 2020
@Himalay12
Copy link
Contributor Author

Himalay12 commented Sep 27, 2020 via email

@Panquesito7 Panquesito7 merged commit 67be3a5 into TheAlgorithms:master Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved; waiting for merge Improvement improvement in previously written codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants