Company: Meesho_6aug
Difficulty: medium
Browser history Problem Description Picture browsing a website where a stack-based history keeps track of every page you visit, starting from "/home". Three actions are available: Go back to the previous page. If the history reads "home/food/menu" and the current page is "food", going back lands you on "home". Go forward. If the history reads "home/food/menu" and the current page is "food", going forward lands you on "menu". Follow a link to a new page. Doing this discards every page that came after the current one, then appends the new page to the history. If the history reads "home/food/menu" and the current page is "food", the history becomes "home/food/diet". Given a series of such actions, report the final contents of the history. Notes on Operations: Clicking back from the home page will not do anything. Clicking forward from the last page will not do anything. If the input is "back", you will go back in history. If the input is "forward", you will go forward in history. Else, yo