Applied Materials interview question

a Leetcode Easy type question