Capital One interview question

Reverse polish notation, medium Leetcode