Dsa
Arrays
Medium
Longest Increasing Subsequence with Duplicates
Given an array of integers 'nums', return the length of the longest increasing subsequence that can include duplicates. The subsequence is strictly increasing but can have equal values. Example Input: '1 3 2 2 4' Output: 4
Key concepts
arrayssubsequencesdynamic programming
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now