Compute longest increasing subsequence length
Company: Pinduoduo
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates understanding of sequence analysis and algorithmic problem solving, assessing competency with subsequences, reasoning about complexity, and algorithmic optimization.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ([10,9,2,5,3,7,101,18],)
Expected Output: 4
Explanation: Prompt example 1.
Input: ([0,1,0,3,2,3],)
Expected Output: 4
Explanation: Prompt example 2.
Input: ([7,7,7,7],)
Expected Output: 1
Explanation: Strictly increasing rejects equals.
Hints
- Choose a representation that makes the requested operation direct.
- Handle empty inputs and boundary cases first.