Dynamic Programming, Facebook Coding Interview, Google Coding Interview, Coding Interviews, Java.
Input array nums[] containing n integers Dp state dp[i] represents longest increasing subsequence till i index where nums[i] is the largest element or nums[i] included in increasing subsequence. init state dp[i] = 1 i = 1 to nums.length-1 j = 0 to i-1 dp[i] = max(dp[i], 1 + dp[j]) if nums[j] <