Tree Navigation II

Auto-expand the ancestor path of the current page on load by lifting the expand state into each navigation list.

Asked in frontend interviews at Apple, Atlassian and Waymo