✅✅Python Simple Solution 🔥🔥 Easiest🔥Video
Please UPVOTE \uD83D\uDC4D\n\n!! BIG ANNOUNCEMENT !!\nI am Giving away my premium content videos related to computer science and data science and also will be s
# Please UPVOTE \uD83D\uDC4D\n\n**!! BIG ANNOUNCEMENT !!**\nI am Giving away my premium content videos related to computer science and data science and also will be sharing well-structured assignments and study materials to clear interviews at top companies to my first 1000 Subscribers. So, **DON\'T FORGET** to Subscribe\n\nhttps://www.youtube.com/@techwired8/?sub_confirmation=1\n\n**Video in Comment section Below** \uD83D\uDC47\n\nFor Video Search \uD83D\uDC49 **"Design Browser History Tech Wired Leetcode"** on YouTube\n\n![Yellow & Black Earn Money YouTube Thumbnail (53).png](https://assets.leetcode.com/users/images/617bdb36-381f-4a64-87fa-3d6ebb7e8aec_1679103396.6760216.png)\n\n\n```\nclass BrowserHistory:\n\n    def __init__(self, homepage: str):\n        self.history = [homepage]\n        self.current = 0\n\n    def visit(self, url: str) -> None:\n        self.history = self.history[:self.current+1] + [url]\n        self.current += 1\n\n    def back(self, steps: int) -> str:\n        self.current = max(0, self.current - steps)\n        return self.history[self.current]\n\n    def forward(self, steps: int) -> str:\n        self.current = min(len(self.history)-1, self.current + steps)\n        return self.history[self.current]\n\n```\n![image.png](https://assets.leetcode.com/users/images/e2515d84-99cf-4499-80fb-fe458e1bbae2_1678932606.8004954.png)\n\n# Please UPVOTE \uD83D\uDC4D
['Design', 'Python', 'Python3']