MS Brings Cortana Enabled Cards On Bing.com# PDA - 掌中宝
e*e
1 楼
Given a vector of integers, find the longest consecutive sub-sequence of
increasing numbers. If two sub-sequences have the same length, use the one
that occurs first. An increasing sub-sequence must have a length of 2 or
greater to qualify.
Example input:
[1 0 1 2 3 0 4 5]
Result:
[0 1 2 3]
increasing numbers. If two sub-sequences have the same length, use the one
that occurs first. An increasing sub-sequence must have a length of 2 or
greater to qualify.
Example input:
[1 0 1 2 3 0 4 5]
Result:
[0 1 2 3]