Progress Interview Question

Longest possible sequence in the given array