Python using List | Easy | 99% faster
\nclass BrowserHistory:\n\n    def __init__(self, homepage: str):\n        self.urls = []\n        self.urls.insert(0,"#")\n        self.urls.insert(1,homepage)
```\nclass BrowserHistory:\n\n    def __init__(self, homepage: str):\n        self.urls = []\n        self.urls.insert(0,"#")\n        self.urls.insert(1,homepage)\n        self.ptr = 1\n\n        \n    def visit(self, url: str) -> None:\n        self.ptr += 1\n        self.urls.insert(self.ptr,url)\n        self.urls = self.urls [0:self.ptr+1]\n        return None\n\n    \n    def back(self, steps: int) -> str:\n        if steps >= self.ptr:\n            self.ptr = 1\n        else:\n            self.ptr = self.ptr-steps\n        return self.urls[self.ptr]\n        \n        \n    def forward(self, steps: int) -> str:\n        if (steps+self.ptr)<len(self.urls):\n            self.ptr = steps+self.ptr\n        else:\n            self.ptr = len(self.urls)-1\n        return self.urls[self.ptr]\n```
['Python', 'Python3']