๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.61K 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
#include <bits/stdc++.h>
using namespace std;

string getPerfectExecutionString(string& category) {
    vector<int> freq(26, 0);
    for (char& x : category) {
        freq[x - 'a']++;
    }

    string temp;
    string ans;
    int p = 0; 

    for (int i = 0; i < 26; i++) {
        while (!temp.empty() && temp.back() - 'a' <= i) {
            ans.push_back(temp.back());
            temp.pop_back();
        }

        while (freq[i]) {
            if (category[p] - 'a' == i) {
                ans.push_back(category[p]);
            } else {
                temp.push_back(category[p]);
            }
            freq[category[p++] - 'a']--;
        }
    }

    while (!temp.empty()) {
        ans.push_back(temp.back());
        temp.pop_back();
    }

    return ans;
}


Get perfect executing string โœ…
DE Shaw
void dfs(vll &arr,int n,int m,int i,int j,vl &ans,ll val,ll mini){
    if(i==n-1 and j==m-1){
        ans.pb(mini);
        return;
    }
    if(i+1<n and j<m){
        dfs(arr,n,m,i+1,j,ans,val+arr[i+1][j],min(mini,val+arr[i+1][j]));
    }
    if(i<n and j+1<m){
        dfs(arr,n,m,i,j+1,ans,val+arr[i][j+1],min(mini,val+arr[i][j+1]));
    }
}
void solve()
{
    ll n,m;
    cin>>n>>m;
    vll arr(n,vl(m));
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            cin>>arr[i][j];
        }
    }
    vl ans;
    dfs(arr,n,m,0,0,ans,arr[0][0],arr[0][0]);
    sort(all(ans));
    if(ans[0]>0){
        cout<<0<<endl;
        return;
    }
    cout<<abs(ans[0])+1<<endl;
    debug(ans);
}

Mario โœ…
โค1๐Ÿ”ฅ1
class Chief:
    @classmethod
    def poloChampionship(cls, input1, input2, input3, input4, input5):
        N = input1 
        D = input2
        R = input3
        X = input4
        C = input5

        dail = N * R
        maxi = max(D)
        tot = 0

        if maxi <= X:
            tot = sum(D) * C
        else:
            tot = N * X * C

        lon = R + tot
        return min(dail, lon)


Polo Championship โœ…
class FibonacciIterator:
    def __init__(self, n):
        self.prev = 0 
        self.curr = 1 
        self.count = 0 
        self.n = n 

    def __iter__(self):
        return self

    def __next__(self):
        if self.count >= self.n:
            raise StopIteration
        fib = self.prev
        self.prev, self.curr = self.curr, self.prev + self.curr 
        self.count += 1
        return fib


Custom Iterator โœ…
Servicenow
def priceCheck(products, productPrices, productSold, soldPrice):
    price_map = {}
    for i in range(len(products)):
        price_map[products[i]] = productPrices[i]
    error_count = 0
    for j in range(len(productSold)):
        correct_price = price_map[productSold[j]] 
        if soldPrice[j] != correct_price:
            error_count += 1
    return error_count


IBMโœ…
Please try to react on the post in case you are applying, it will hardly take your 10 secs but enough to motivate me to share more and more opportunities everyday without fail:)

Just one favour if you canโค๏ธ
โค6๐Ÿคฎ4๐Ÿ‘2๐Ÿ‘Ž1