YITU Technology interview question

Find the array and the largest sub-array, Time complexity required is O(n)