Longest increasing subsequence queries

Правка en2, от swordx, 2019-03-04 19:33:03

Hello all,

Can you please share your thoughts on the following question:

Given an array of integers and some queries, you have to tell the length of the longest increasing subsequence for each query. The query is in the form such that you have to change the value at a given index to given value. Each query is independent of others. So the array gets backs to its original state after each query.

Example: Arr[]={1,6,2,4};

query: 1 4 : means: arr[1]=4, Now calculate the length of LIS.

Thanks in advance.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский swordx 2019-03-04 19:33:03 102
en1 Английский swordx 2019-03-04 11:57:58 463 Initial revision (published)