Hard data structure and algorithm practice puzzle.
A table of running totals answers any range sum at once, but changing one number means rebuilding it. A Fenwick tree does both in about log n steps. Slot i of the tree holds the sum of a block of numbers ending at i, and the block's length is the lowest set bit of i. Given nums and a list of operations, [0, i, v] adds v to nums[i] and [1, a, b] asks for the sum from index a to b inclusive. Return the answers to the questions, in order.
Solve it three ways: snap the jigsaw pieces together, fill in the blanks, or type it from scratch against the tests. This one is free to play, with no account.
Every line of the solution comes with a note explaining why it is there, and a step by step replay shows the code running. At level 3, where you type it yourself, you can ask for an AI mock interview on this problem that ends with a hiring manager's scorecard.
Then grow it into a real project with the Software Engineer button: this puzzle becomes the Ticket Flag Store, a pipeline you can run and download. See every Software Engineer project.