Uber Interview Question

Node problem using a stack