ProAlgos / ProAlgos-Cpp

C++ implementations of well-known (and some rare) algorithms, while following good software development practices
MIT License
508 stars 363 forks source link

Add fenwick tree #389

Closed PhysicsUofRAUI closed 3 years ago

PhysicsUofRAUI commented 3 years ago
PhysicsUofRAUI commented 3 years ago

Thanks for reviewing. I'll get on the changes.

Just so you know I haven't yet done a PR and then made requested changes to that PR, so I do not know how exactly to do it. The only I can think of is that I make the changes requested on my computer, push them to the branch on my fork and then do another PR, however that seems wrong. Is there an update option when doing the second PR?

alxmjo commented 3 years ago

Just so you know I haven't yet done a PR and then made requested changes to that PR, so I do not know how exactly to do it. The only I can think of is that I make the changes requested on my computer, push them to the branch on my fork and then do another PR, however that seems wrong. Is there an update option when doing the second PR?

Actually it's even easier than that. Just make your changes locally, push them to your branch on github (the one from which you originally opened the PR, add_fenwick_tree), and then the PR will automatically update with your changes.

PhysicsUofRAUI commented 3 years ago

Actually it's even easier than that. Just make your changes locally, push them to your branch on github (the one from which you originally opened the PR, add_fenwick_tree), and then the PR will automatically update with your changes.

That does sound easy. Thanks!

PhysicsUofRAUI commented 3 years ago

I think I've completed all the requested changes. I changed the ordering of value and index because it has been a while since I regularly programmed with C++, so you are probably right about it.

alxmjo commented 3 years ago

This was a great submission. Thank you for contributing and please don't hesitate to open another PR in the future. 🙂