Upwind Interview Question

2 medium lit code questions