Greater Sum Tree of a Sensor Reading BST

Company: Apple

Difficulty: medium