In the video’s begining goal was to find min element in stack in o(1) time and space … so why not just simply keep track of the element being inserted and have a currentMin variable which compares minimum of the prev min and element going to be inserted and why do we need to do 2*x - current_min operation
we are at the end having the final ans as 3 but it should be 1 as it is min in stack … I am bit confused , what is going on in the video and approach?