Amazon interview question

Basic calculator which is a leetcode hard