๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.58K subscribers
5.59K photos
3 videos
95 files
10.1K 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
I am looking for a motivated Fresher to join in Bangalore. This role will involve providing HR support and managing coordination tasks within the HR department.

Role -  HR Apprentice 
Location -  Bangalore 
Start Date -  Immediate 
Qualification MBA in HR (Fresher) 
Preferred Candidate Female 
Essential Skills - Proficient in MS Excel, good communication, and coordination skills

Email resume - reetikaraj@fedfina.com
โค2๐Ÿ‘2
โ€œเคœเคฌ เคœเคฌ เคนเฅ‹เคˆ เคงเคฐเคฎ เค•เฅ€ เคนเคพเคจเฅ€, เคฌเคพเคขเคผเคนเคฟ เค…เคธเฅเคฐ เค…เคงเคฎ เค…เคญเคฟเคฎเคพเคจเฅ€เฅค เคคเคฌ-เคคเคฌ เคงเคฐเคฟ เคชเฅเคฐเคญเฅ เคตเคฟเคตเคฟเคง เคถเคฐเฅ€เคฐเคพ, เคนเคฐเคนเคฟ เคฆเคฏเคพเคจเคฟเคงเคฟ เคธเคœเฅเคœเคจ เคชเฅ€เคฐเคพเฅคเฅคโ€
LinkedIn SDE Intern Opening that I shared a few weeks ago

Test 1 is already done, Have you given it ?


Test 2 is today, Have you got the link?

All the best โ™ฅ๏ธ
๐Ÿ‘5โค2๐Ÿคฉ1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>

using namespace std;


/*
* Complete the 'countGoodSubsequences' function below.
*
* The function is expected to return an INTEGER.
* The function accepts STRING word as parameter.
*/
const int M = 1000000007;

    int add(int x, int y) {
        if ((x += y) >= M) {
            x -= M;
        }
        return x;
    }

    int mul(long long x, long long y) {
        return x * y % M;
    }

    int rev(int x) {
        int r = 1;
        for (int y = M - 2; y; y >>= 1) {
            if (y & 1) {
                r = mul(r, x);
            }
            x = mul(x, x);
        }
        return r;
    }

int countGoodSubsequences(string s) {
unordered_map<char, int> have;
        for (char c : s) {
            ++have[c];
        }
        const int n = s.length();
        vector<int> r(n + 1);
        for (int i = 1; i <= n; ++i) {
            r[i] = rev(i);
        }
        vector<int> dp(n + 1);
        int m = 0;
        for (const auto& p : have) {
            m = max(m, p.second);
            for (int i = 1, t = 1; i <= p.second; ++i) {
                t = mul(mul(t, p.second - i + 1), r[i]);
                dp[i] = add(mul(dp[i], t + 1), t);
            }
        }
        int ans = 0;
        for (int i = 1; i <= m; ++i) {
            ans = add(ans, dp[i]);
        }
        return ans;
}

LinkedIn โœ…
๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
using namespace std;

const int MOD = 1e9 + 7;

long long comb3(long long n) {
    if (n < 3) return 0;
    return ((n * (n - 1) % MOD) * (n - 2) % MOD) / 6 % MOD;
}

int countEvenProductTriplets(const vector<int>& arr) {
    int n = arr.size();
    int odd_count = 0, even_count = 0;
    for (int num : arr) {
        if (num % 2 == 0) {
            even_count++;
        } else {
            odd_count++;
        }
    }

    long long total_triplets = comb3(n);
    long long odd_triplets = comb3(odd_count);

    long long result = (total_triplets - odd_triplets + MOD) % MOD;

    return (int)result;
}


LinkedIn โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
public static long getMinimumCost(int edgeDeviceCost, int inputPeripheralCost, int bundleCost, int x, int y) {
        long minCost = Long.MAX_VALUE;

        for (int bundles = 0; bundles <= Math.max(x, y); bundles++) {
            int remainingEdgeDevices = Math.max(0, x - bundles);
            int remainingPeripherals = Math.max(0, y - bundles);

            long cost = (long) bundles * bundleCost
                    + (long) remainingEdgeDevices * edgeDeviceCost
                    + (long) remainingPeripherals * inputPeripheralCost;

            minCost = Math.min(minCost, cost);
        }

        return minCost;
    }


LinkedIn โœ…
def simpleCipher(encrypted, k):
    k = k % 26
    decrypted = []
    for char in encrypted:
        old_pos = ord(char) - ord('A')
        new_pos = (old_pos - k) % 26
        new_char = chr(new_pos + ord('A'))
        decrypted.append(new_char)
    return ''.join(decrypted)

LinkedIn โœ…
typedef long long ll;
const int MOD = 1e9 + 7;
ll comb3(ll n) {
    if(n < 3) return 0;
    ll res = n;
    res = res * (n - 1) % MOD;
    res = res * (n - 2) % MOD;
    ll inv6 = 166666668;
    res = res * inv6 % MOD;
    return res;
}

int evenproduct(vector<int> &nums) {
    ll n = nums.size();
    ll even = 0, odd = 0;
    for(auto num : nums){
        if(num % 2 == 0) even++;
        else odd++;
    }
    ll total = comb3(n);
    ll all_odd = comb3(odd);
    ll valid = (total - all_odd + MOD) % MOD;
    return (int)valid;
}

LinkedIn โœ…
Credit : ishaan
typedef long long ll;
ll getMinOperations(vector<int> &change, vector<int> &arr)
{
    int n = change.size(), m = arr.size();
    vector<int> hasSetOperation(m + 1, 0);

    for (int i = 0; i < n; ++i)
    {
        if (change[i] > 0 && change[i] <= m)
        {
            hasSetOperation[change[i]] = 1;
        }
    }
    for (int j = 1; j <= m; ++j)
    {
        if (hasSetOperation[j] == 0)
        {
            return -1;
        }
    }

    ll total_decrements = 0;
    for (auto val : arr)
    {
        total_decrements += (ll)val;
    }

    ll total_sets = (ll)m;
    ll total_operations = total_decrements + total_sets;

    if (total_operations <= (ll)n)
    {
        return total_operations;
    }
    else
    {
        return -1;
    }
}

Minimum operation
LinkedInโœ…
๐Ÿ‘1