stevenhalim / cpbook-code

CP4 Free Source Code Project (C++17, Java11, Python3 and OCaml)
2k stars 493 forks source link

Fix to Fenwick Tree select's method #86

Open rchavesf opened 3 years ago

rchavesf commented 3 years ago

This fixes https://github.com/stevenhalim/cpbook-code/issues/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