educative.io

Searching a place and updating it in the quadtree

Remember that we didn’t build our system to update place’s data frequently. With this design, how can we modify the popularity of a place in our QuadTree? Although we can search a place and update its popularity in the QuadTree, it would take a lot of resources and can affect search requests and system throughput. Assuming the popularity of a place is not expected to reflect in the system within a few hours, we can decide to update it once or twice a day, especially when the load on the system is minimum.

why does it take a lot of resources to search a place and update it in the quadtree? since we have a tree structure, isn’t it just an O(log n) operation?