Longest increasing subsequence
CodeChefOpen on judge ↗
Neel has an array A which consist of all integers. He is interested in finding length of longest increasing subsequence containg a particular element at index k. As he is lazy, help him find required answer. Neel has got Q queries, and each query consists of index k, so find length of LIS including element of array at index k. Note: You need to find strictly longest increasing subsequence and not
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start