aya1909's blog

By aya1909, history, 3 years ago, In English

Given an array, choose two contiguous non-overlapping arrays, such that all elements are strictly increasing. Return the maximum length possible for this combination.

Ex: 7 1 2 4 6 5 3 8 9 10 => ans: 7 (Choose 1 2 4 6 & 8 9 10)

  • Vote: I like it
  • -9
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it
  1. Find for every position the longest such segment to the left of it and to the right of it.

  2. ???

  3. Profit.