Solve non-repeating show substring | Netflix Interview Question