Блог пользователя aya1909

Автор aya1909, история, 3 года назад, По-английски

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)

  • Проголосовать: нравится
  • -9
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
  1. Find for every position the longest such segment to the left of it and to the right of it.

  2. ???

  3. Profit.