title: Get Min/Max in O(1) time from a Queue?
body: <p>How can I retrieve the max and min element from a queue at any time in 0(1) time complexity?
  Earlier I was using Collections.max and min to find the elements but that would be 0(n).</p>