Search
⌘K

Leetcode 1472. Design Browser History

Implement a BrowserHistory class that supports visiting URLs (which clears any forward history), moving back or forward up to a specified number of steps, and returning the current URL. The challenge is to maintain and update the browsing history efficiently while correctly handling bounds when requested steps exceed available history.

Asked at:

Amazon

Amazon

Bloomberg

Bloomberg


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late October, 2025

Bloomberg

Bloomberg

Junior

Mid March, 2025

Amazon

Amazon

Mid-level

Your account is free and you can post anonymously if you choose.