PayPal Interview Question

Find the start and end index of maximum subaray in a given array. (Modification version of Kadane's algorithm) Given a stream of elements find the kth maximum at every postion, the array length is infinite since it is stream.