Applied Materials interview question

Stack related question and DP related