c3.ai 店面

Given an array, for each element, return the length of the longest contiguous array ending at that element such that every number in that contiguous array is strictly less than the current element.

Ex:
input - [1,2,3,3]
output - [1,2,3,1]

input - [7,3,4,6,9,1,5,6,3,7,4,8,2,10]
output - [1,1,2,3,5,1,2,3,1,5,1,7,1,14]