KLA interview question

Arrays and Dictionary related DS problem