Algorithm · DoorDash · Medium
Problem A restaurant refreshes its menu daily. Each menu is structured as an n-ary tree: categories contain menu items, and every node has a key, a value, and an active status. The node class is defined as follows: When a new menu comes in, it is compared against the current menu. A node is considered modified if either its value or its active flag differs from the old tree. Sometimes the updated tree has a different shape — nodes that existed before are now absent…
Checking your access…