Hulu Interview Question

Both coding questions were from leetcode, medium difficulty. Nothing fancy, massaging arrays.