Solve path normalization and nested iterator | Bridge Interview Question