If i do pop once then answer is 2 only which is not correct

Stack Get Minimum In Const Time And Space Hint

hi kunal
also post the code for which u r takig about