C++ Easy O(1) T.C. Faster than 96%
\'\'\'\nclass BrowserHistory {\npublic:\n    \n    int c=0;\n    int c_max=0;\n    unordered_mapmp;\n    BrowserHistory(string homepage) {\n        mp[c]=homepa
\'\'\'\nclass BrowserHistory {\npublic:\n    \n    int c=0;\n    int c_max=0;\n    unordered_map<int,string>mp;\n    BrowserHistory(string homepage) {\n        mp[c]=homepage;\n    }\n    \n    void visit(string url) {\n        c++;\n        mp[c]=url;\n        c_max=c;\n    }\n    \n    string back(int steps) {\n        c=c-steps;\n        if(c<0)c=0;\n        return mp[c];\n    }\n    \n    string forward(int steps) {\n        c=c+steps;\n        if(c>c_max)c=c_max;\n        return mp[c];\n    }\n};\n\n/**\n * Your BrowserHistory object will be instantiated and called as such:\n * BrowserHistory* obj = new BrowserHistory(homepage);\n * obj->visit(url);\n * string param_2 = obj->back(steps);\n * string param_3 = obj->forward(steps);\n */\n\'\'\'
['Design', 'C']