python super easy to understand with list and pointer  (no stack and no double link list)
\nclass BrowserHistory:\n\n    def __init__(self, homepage: str):\n        self.history = [homepage]\n        self.pointer = 0\n\n    def visit(self, url: str) 
```\nclass BrowserHistory:\n\n    def __init__(self, homepage: str):\n        self.history = [homepage]\n        self.pointer = 0\n\n    def visit(self, url: str) -> None:\n        self.history  = self.history [:self.pointer+1]\n        self.history.append(url)\n        self.pointer = len(self.history ) - 1\n    def back(self, steps: int) -> str:\n        self.pointer = max(self.pointer - steps, 0)\n        return self.history [self.pointer]\n\n    def forward(self, steps: int) -> str:\n        self.pointer = min(self.pointer +steps, len(self.history )-1)\n        return self.history [self.pointer]\n```
[]