-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Merge sort #1066
Conversation
There was a problem hiding this 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.
Rebase needed. |
How to rebase? How do we write code so we will not get error?
…On Mon, Sep 21, 2020, 09:47 David Leal ***@***.***> wrote:
Rebase needed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1066 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMX6C5OYIQJUDBAFXHU4XALSG3HW5ANCNFSM4QPYSFIQ>
.
|
See the GitHub Documentation for how to resolve conflicts. 🙂 |
Replaced two while loop by adding condition in if statement of first while loop of merging. |
What is this PR about? Please add a brief description in the first post. Thanks. |
I can write here about it.
…On Sun, Sep 27, 2020, 23:48 David Leal ***@***.***> wrote:
What is this PR about? Please add a brief description in the first post.
Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1066 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMX6C5INYOVSSEGHUJAXCO3SH56WZANCNFSM4QPYSFIQ>
.
|
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])). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍 😄
Thank you
…On Mon, Sep 28, 2020, 00:29 David Leal ***@***.***> wrote:
***@***.**** approved this pull request.
LGTM. 👍 😄
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1066 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMX6C5MD7I72P4IKBLMQDF3SH6DR7ANCNFSM4QPYSFIQ>
.
|
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
Notes: