✔ C++ || 95% faster, 99% less memory || very easy solution with a small array || explained
we only need to keep track, curr page and curr size\n1. count-> current page\n2. curr -> current size of the array\n\n int count=0,curr=0;\n    string v[110];\n
we only need to keep track, curr page and curr size\n1. count-> current page\n2. curr -> current size of the array\n```\n int count=0,curr=0;\n    string v[110];\n    BrowserHistory(string homepage) {\n        v[count]=homepage;\n    }\n    \n    void visit(string url) {\n        v[++count]=url;\n        curr=count;\n    }\n    \n    string back(int steps) {\n        count = max(count-steps, 0);\n        return v[count];\n    }\n    \n    string forward(int steps) {\n        count = min(curr, count+steps);\n        return v[count];\n    }\n```\n# if you find it helpful, plz upvote
['C']