← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
Level: Mid-Level
Round: Phone Screen · Type: System Design · Difficulty: 6/10 · Duration: 60 min · Interviewer: Neutral
Topics: System Design
Location: San Francisco Bay Area
Interview date: 2025-08-15
The interview involved designing a simplified browser history system.
I was asked to design a simplified browser history system with the following functionalities:
visit(url: string): Visit a new URL, clearing all forward history.back(steps: int) -> string: Move backward in history by up to steps, returning the current page. Stop at the first page if the beginning of history is reached.forward(steps: int) -> string: Move forward in history by up to steps, returning the current page. Stop at the last page if the end of history is reached.I had to implement a BrowserHistory class that initializes with a homepage and supports these methods.
The follow-up question was to support havevisited(url) -> bool and to support multiple tabs.