← Swiggy questions
CodingReported in a candidate post, Sep 2022

Maximum length of pair chain

Filed under Swiggy

You are given n pairs [left, right] with left < right. A pair p2 can follow p1 if p1.right < p2.left. Return the length of the longest chain you can form; pairs can be used in any order and you may…

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 Swiggy questions

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