Coalition Interview Question

A data structure question on Stacks. Similar to Evaluate Reverse Polish notation on leetcode with some variations.