Java || Doubly Linked List || Complete explanation
```\nclass BrowserHistory {\n     // creating the structure for doubly linked list \n    class Node {\n        String val;\n        Node prev;\n        Node nex
```\nclass BrowserHistory {\n     // creating the structure for doubly linked list \n    class Node {\n        String val;\n        Node prev;\n        Node next;\n        \n        public Node(String val)\n        {\n            this.val = val;\n        }\n    }\n    \n    // the node which will be used to traverse \n     Node curr;\n \n    \n    public BrowserHistory(String homepage) {\n       // making the first node using homepage\n        Node node =  new Node(homepage);\n        node.prev = null;\n        node.next = null;\n        curr = node;\n       \n    }\n    // simple explanation of visit is that the new node to be visited from the curr is attched just to the next to it, \n    // even if the url is already present in the linked still we need to create a new node of url and attach it next to curr,\n    // imp-> if any other chain of nodes are present ahead of curr, they are removed and the new url node is added \n    public void visit(String url) {\n        Node node =  new Node(url);\n        curr.next = node;\n        Node temp = curr;\n        curr = curr.next;\n        curr.prev = temp;\n         \n            \n    }\n    // go back and get the value , if we exceed the linked list then return the first value \n    \n    public String back(int steps) {\n        \n            while(curr.prev!=null && steps-->0)\n            {\n               curr = curr.prev; \n            }\n                   \n        return curr.val;\n                  \n    }\n    // same as back \n    \n    public String forward(int steps) {\n      \n            while(curr.next!=null && steps-->0)\n                curr = curr.next;\n            \n        return curr.val;\n    }\n}\n\n// leetcode google facebook \n//    c
['Linked List', 'Java']