Given array of integers, return the length of the longest increasing subarray.
Anonymous
def find_longest_subarray_length(a): max = -1 current = 0 for x in xrange(len(a)): if x max: max = current current = 0 if max == 0: return -1 else: return max + 1 O(n)
Check out your Company Bowl for anonymous work chats.