Return the longest contiguous subarray with all distinct values | Netflix Interview Question