Pergunta de entrevista da empresa FactSet

Dynamic programming problem in which a matrix was given with some values. We have to start from (0,0) and end at (m,n) with the condition that we can only move forward and downward.Implement a stack in which we can find min element in O(1) at the same time push and pop operation should take O(1).