๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.61K photos
3 videos
95 files
10.6K 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
int solve(int n, vector<int>& A, int M) {
    sort(A.begin(), A.end());
    int candies = 0;
    for (int i = 0; i < n; i++) {
        if (A[i] % 5 == 0 || A[i] <= M) {
            candies++;
            M -= A[i] % 5 == 0 ? 0 : A[i];
        }
        if (M == 0) {
            break;
        }
    }
    return candies;
}


Halloween candiesโœ…
int solve(vector<int>& A, int n) {
    int maxi = 0, cur = 0;
    for (int i = 1; i < n; i++) {
        if (A[i] < A[i - 1]) {
            cur++;
            if (cur >= 3) {
                maxi = max(maxi, cur);
            }
        } else {
            cur = 0;
        }
    }
    return maxi + 1;
}

Arctic temperature tracker โœ…
public class Main {

    public static int countSetBits(int number) {
        return Integer.bitCount(number);
    }
    public static int countElementsWithSetBits(int[] arr, int N, int X) {
        int count = 0;
        for (int num : arr) {
            if (countSetBits(num) == X) {
                count++;
            }
        }
        return count;
    }.  

SET BITSโœ…
๐Ÿ‘1
Genpect is hiring B.com/BBA/ MBA freshers or any accounting background for OTC/Order to Cash -Cash Applications skillset.

Job requirements:
. Good accounting knowledge
. Should understand OTC cycle
. Flexible to work in any shifts
. 5 days Work from Office.
. Office location- Gurgaon 22B

Interested candidates can share their resumes at the earliest at parul. chaturvedi1@genpact.com
Swageazy is seeking a driven and enthusiastic Sr. Associate - Enterprise Sales.
Experience - Fresher ( who has recently graduated).

Job location - HSR, Bangalore
Salary - Up to 5.5 lpa

Interested candidates can share their resume on ankita@swageazy.com
vector<int> BobnBot(int N, int M, vector<vector<int>> games, int Q, vector<vector<int>> queries) {
    vector<int> result;
    for (const auto& query : queries) {
        vector<int> cleaned_query;
        for (int num : query) {
            if (num != -1) {
                cleaned_query.push_back(num);
            } else {
                break;
            }
        }
        int match_count = 0;
        for (const auto& game : games) {
            bool match = true;
            for (size_t i = 0; i < cleaned_query.size(); ++i) {
                if (game[i] != cleaned_query[i]) {
                    match = false;
                    break;
                }
            }
            if (match) {
                ++match_count;
            }
        }

        result.push_back(match_count);
    }

    return result;
}

The bot and the game โœ…
๐Ÿ‘1
vector<string> areAlmostEquivalent(vector<string>& s, vector<string>& t) {
    vector<string> result;
    auto countCharacters = [](const string& str) {
        vector<int> count(26, 0);
        for (char c : str) {
            count[c - 'a']++;
        }
        return count;
    };
    for (size_t i = 0; i < s.size(); ++i) {
        const string& str_s = s[i];
        const string& str_t = t[i];
  
        vector<int> count_s = countCharacters(str_s);
        vector<int> count_t = countCharacters(str_t);

        bool isAlmostEquivalent = true;
        for (int j = 0; j < 26; ++j) {
            if (abs(count_s[j] - count_t[j]) > 3) {
                isAlmostEquivalent = false;
                break;
            }
        }

        if (isAlmostEquivalent) {
            result.push_back("YES");
        } else {
            result.push_back("NO");
        }
    }
   
    return result;
}

Almost Equivalent strings โœ…
๐Ÿ‘1