Learn

To the right, we have an example we outlined in the previous article. We described prefix sums and how we can utilize binary indexed trees as an efficient way to compute them. Recall that each element in a binary indexed tree has a range of responsibility that we can use to compute the value of the element. Using Python, in this lesson, you will practice:

  • Constructing a binary indexed tree
  • Computing the range of responsibility of an element
  • Updating a binary indexed tree
  • Computing a prefix sum using a binary indexed tree

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?