LinkedIn interview question

Max Stack variation with time and space complexity