title: Improving data structure
body: <p>If I have a data structure that acting like a stack, which I implemented using Doubly Linked list, I also added a pointer which always keeps the middle element.</p>
  
  <p>I want to modify it by adding a method peekAt(k) which will return the Kth inserted element, in O(log(k)).</p>
  
  <p><img src="https://i.stack.imgur.com/MtGay.jpg" alt="linked list"></p>
  
  <p>Any ideas how can I do this? Thanks.</p>