๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.59K photos
3 videos
95 files
10.2K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
bool comp(vector<int> a, vector<int> b) {
    if (a[1] == b[1])
        return a[0] < b[0];
    else
        return a[1] < b[1];
}

int solve(vector<vector<int>>& b) {
    sort(b.begin(), b.end(), comp);
    int count = 1;
    int end = b[0][1];
    for (int i = 1; i < b.size(); i++) {
        if (b[i][0] > end) {
            count++;
            end = b[i][1];
        }
    }
    return count;
}
๐Ÿ‘3๐Ÿ”ฅ2