-
Notifications
You must be signed in to change notification settings - Fork 1.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
Question about your merge sort! #1
Comments
Hi Stacey, Thanks! The shift method removes an element from the array, while left[il++] access the element only. Accessing the element is a cheaper operation rather than removing it. Have a nice day! |
Thanks very much Loiane - I've just gotten my brain around left[i++], and I really appreciate your response! Your book will be very fun to look at, I hope it comes out in Kindle form so I can use it on my phone. I hope you sell many copies :) |
I just discoverd your book, and want to point out an error in the first example of arrays. works. |
I see that you have an example of it on the next page :) How do I help you if I find more typo's and errors? |
Thanks Anthony. If you find errors, you can create issues here! Thanks again! |
Hey Loiane, thanks for writing this book. It's awesome to be able to jump into the concepts with having to learn all of the mathematical notations in conjunction with C || Java! |
without* |
Thanks Ryan! Hope you like it! :) |
Merge pull request #1 from loiane/main
Hello and congrats on your upcoming book! I look forward to it, and am delighted to see that you are a a woman :)
I am just working with merge sort algos for the first time, and see you've got a slightly different thing going on here - the
result.push(left[il++]);
instead of using result.push(left.shift()) - which seems to be what I've seen elsewhere. Does eliminating the shift() help performance?
thanks for all your samples and best of luck w/ the book launch.
Obrigada desde Alaska
Stacey
The text was updated successfully, but these errors were encountered: