Longest Increasing Subsequence Length

What’s a subsequence? Any selection of items from the original array. The selection must respect the order. Meaning for [1,2,3,4,5] only two of the four below are subsequences: [1,2,3,4,5] ✅ [1,4,3,2,5] ❌ order not respected [1,2,5] ✅ [5,1] ❌ order not respected What’s the difference between a subsequence and a subarray? Subarray, is just like subsequence, that is order must be respected. Additionally the sub-array has to be made of continuous elements....

August 25, 2022 · 3 min