Adobe interview question

return the longest subarray of consecutive numbers