Google L3 Phone Screen

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-12-30Added By Anonymous
Source: Link

Company: Google
Role: L3
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Find the longest subsequence where each element is 1 greater than the previous element.

Follow up 1: Difference between the current element and the previous element can be between 1 and k
Follow up 2: Print longest subsequence elements
Follow up 3: Optimize any two of your approach O(n*k) or O(n*n)
Suggested Segment tree approach

Comments