find the longest length of ascending sequence for an array