classNode { public: int value; Node *prev; Node *next;
Node(int value); };
// Feel free to add new properties and methods to the class. classDoublyLinkedList { public: Node *head; Node *tail; unordered_map<int, unordered_set<Node*>> mp;
DoublyLinkedList() { head = nullptr; tail = nullptr; }