algo4: stack: Simplify path