前往
大廳
主題

[leetcode]1964. Find the Longest Valid Obstacle Course at Each Position

♙♲⚙\~O_O~/⚙♲♙ | 2021-08-14 12:00:03 | 巴幣 2 | 人氣 276

題目: 1964. Find the Longest Valid Obstacle Course at Each Position
難度: Hard
目前下列解法的時間複雜度:O(n*lg(n))


題目說明

給一長度 n 的數字陣列,
問從頭到每一個數字的LIS,但是是非嚴格遞增版。


解法

1. 同 這個 的LIS,lower_bound改upper_bound
2. 結束了


source code


創作回應

相關創作

更多創作