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

Fix to Fenwick Tree select's method #86

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rchavesf
Copy link

@rchavesf rchavesf commented Mar 22, 2021

This fixes #85. The issue was caused by an out of range access.
Tests for this change that run successfully: https://ideone.com/a8go2h.

Update: This also fixes #90 now. It was applied to the code in Python. Here are the tests for it: https://ideone.com/YpJSdE

@rchavesf rchavesf changed the title Fix in Fenwick Tree select's method Fix to Fenwick Tree select's method Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FTree.select throws IndexError: list index out of range Fenwick Tree's select method gives incorrect answer
1 participant