c++(108ms 97%) simple, small, easy
Runtime: 108 ms, faster than 96.95% of C++ online submissions for Design Browser History.\nMemory Usage: 57.4 MB, less than 78.89% of C++ online submissions for
Runtime: 108 ms, faster than 96.95% of C++ online submissions for Design Browser History.\nMemory Usage: 57.4 MB, less than 78.89% of C++ online submissions for Design Browser History.\n```\nclass BrowserHistory {\npublic:\n  vector<string> v;\n  int id; \n  \n  BrowserHistory(string homepage) {\n    id = 0;\n    v.push_back(homepage);\n  }\n    \n  void visit(string url) {\n    v.resize(++id);\n    v.push_back(url);\n  }\n    \n  string back(int steps) {\n    return v[id = max(0, id - steps)];\n  }\n    \n  string forward(int steps) {\n    return v[id = min( int(v.size() - 1), id + steps)];\n  }\n};\n```
['C', 'C++']