[C++] clean code & creating linked list
\nclass BrowserHistory {\npublic:\n    struct Node {\n        string data;\n        Node* next;\n        Node* prev;\n        \n        Node(string val) {\n    
```\nclass BrowserHistory {\npublic:\n    struct Node {\n        string data;\n        Node* next;\n        Node* prev;\n        \n        Node(string val) {\n            data = val;\n            next = nullptr;\n            prev = nullptr;\n        }\n    };\n    \n    Node* current = nullptr;\n    \t    \n    BrowserHistory(string homepage) {\n        Node* nn = new Node(homepage);\n        current = nn;\n    }\n    \n    void visit(string url) {\n        Node* nn = new Node(url);\n\t\tcurrent->next = nn;\n\t\tnn->prev = current;\n\t\tnn->next = nullptr;\n        current = nn;\n    }\n    \n    string back(int steps) {\n        while (steps > 0 && current->prev != nullptr) {\n            current = current->prev;\n            steps--;\n        }\n        return current->data;\n    }\n    \n    string forward(int steps) {\n        while (steps > 0 && current->next != nullptr) {\n            current = current->next;\n            steps--;\n        }\n        return current->data;\n    }\n};\n```
['Linked List', 'C', 'C++']