Solve PTO window and sparse unique counting | Meta Interview Question