Mr. Cooper interview question

Doubly Linked list and time complexity