← MakeMyTrip questions
CodingMediumReported in a candidate post, Aug 2022

Longest Ideal Subsequence

Filed under MakeMyTrip

Given a string `s` and an integer `k`, return the length of the longest ideal subsequence where the absolute difference between the alphabet values of adjacent characters in the subsequence is at most…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related MakeMyTrip questions

Collected from public candidate posts and coding forums. Updated Nov 2026.