๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
void solve(int tc)
{
        int n,k;
        string s;
        cin >> k >> s;
        n = s.size();
        string str="";
        string find=s.substr(k,n-1);
        int i=0,j=k-1;
        while(i<j)
            str+=s[i++],str+=s[j--];
        if(i==j) str+=s[j];
        reverse(all(str));
        string res = str + find;
        cout << res << '\n';
    }

String Reversal โœ…
๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
ll dp[102][2][902];
const int mod = 1e9 + 7;
ll solve(int i, bool tight, int sum_so_far, int Sum, string number, int len) {
    if (i == len) {
        if (sum_so_far <= Sum)
            return 1;
        else
            return 0;
    }

    ll &ans = dp[i][tight][sum_so_far];
    if (~ans) return ans;

    ans = 0;
    bool ntight;
    int nsum_so_far;
    for (char currdigit = '0'; currdigit <= '9'; currdigit++) {
        if (!tight && currdigit > number[i]) break;
        ntight = tight || currdigit < number[i];
        nsum_so_far = sum_so_far + (currdigit - '0');
        ans += solve(i + 1, ntight, nsum_so_far, Sum, number, len);
        ans %= mod;
    }
    return ans;
}
void op() {
    string num1, num2;
    int mxmSum, mnmSum;
    cin >> num1 >> num2 >> mnmSum >> mxmSum;
    mnmSum--;
    ll res1, res2, fin1 = 0;

    if(num1 != "0") {
        for(int i = num1.size() - 1; i >= 0; i--){
            if(num1[i] != '0'){
                num1[i]--;
                break;
            }else num1[i] = '9';
        }
        if(num1[0] == '0'){
            reverse(num1.begin(), num1.end());
            num1.pop_back();
            reverse(num1.begin(), num1.end());
        }
        ::memset(dp, -1, sizeof dp);
        res1 = solve(0, 0, 0, mnmSum, num1, num1.size());
        ::memset(dp, -1, sizeof dp);
        res2 = solve(0, 0, 0, mxmSum, num1, num1.size());
        fin1 = res2 - res1;
        fin1 %= mod;
    }

    ::memset(dp, -1, sizeof dp);
    res1 = solve(0, 0, 0, mnmSum, num2, num2.size());
    ::memset(dp, -1, sizeof dp);
    res2 = solve(0, 0, 0, mxmSum, num2, num2.size());
    ll fin2 = res2 - res1;
    fin2 %= mod;

    cout << (fin2 - fin1) % mod << "\n";
}

Digit sums โœ…
EY is hiring for Freshers into Researchanalyst role ๐Ÿ“ข

Candidates with experience in secondarymarketresearch and thirdpartyduediligence are applicable for this role only.

๐Ÿ“ Location: Noida
๐Ÿ“Œ Work mode: Work from Office

โœ… Interested candidates can share their CVs at himani.mittal@in.ey.com along with their below details.

Name:
current location:
preferred location:
Current CTC:
Expected CTC:
Current Company:
Official Notice period:
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;cin>>n;
    vector<int>v(n);
    int bud;cin>>bud;
    for(int i=0;i<n;i++){
        cin>>v[i];
    }
    int diff=INT_MAX;
    pair<int,int>p;
    for(int i=0;i<(n-1);i++){
        int left=bud-v[i];
        if(left<=0)
        {
             int curr_diff=bud-v[i]-v[i+1];
            if(abs(curr_diff)<diff){
                diff=abs(curr_diff);
                p.first=v[i];
                p.second=v[i+1];
               
            }
            continue;
        }
        if(v[n-1]<=left){
            int curr_diff=bud-v[i]-v[n-1];
            if(abs(curr_diff)<diff){
                diff=abs(curr_diff);
                p.first=v[i];
                p.second=v[n-1];
               
            }
            continue;
        }
        int idx=lower_bound(v.begin()+i+1,v.end(),bud-v[i])-v.begin();
        if(idx==(i+1)){
            int curr_diff=bud-v[i]-v[idx];
            if(abs(curr_diff)<diff){
                diff=abs(curr_diff);
                p.first=v[i];
                p.second=v[idx];
               
            }
        }
        else{
            int curr_diff1=abs(bud-v[i]-v[idx]);
            int curr_diff2=abs(bud-v[i]-v[idx-1]);
            if(curr_diff2<curr_diff1){
                if(curr_diff2<diff){
                diff=curr_diff2;
                p.first=v[i];
                p.second=v[idx-1];
                }
            }
            else{
                if(curr_diff1<diff){
                diff=curr_diff1;
                p.first=v[i];
                p.second=v[idx];
                }
            }
           
        }
       
    }
    cout<<p.first<<endl;
    cout<<p.second<<endl;
   
return 0;
}

Budget issues โœ…
class UserMainCode(object):
    @classmethod
    def musicTeacher(cls, input1):
        n = len(input1)
        dp = [i for i in range(n + 1)]
        for i in range(1, n + 1):
            cnt = [0] * 26
            for j in range(i, 0, -1):
                d = ord(input1[j - 1]) - ord('a')
                cnt[d] += 1
                val = cnt[d]
                f = 0
                for k in range(26):
                    if cnt[k] != 0 and cnt[k] != val:
                        f = 1
                        break
                if f == 0:
                    dp[i] = min(dp[i], 1 + dp[j - 1])
        return dp[n]

Music Teacher โœ…
๐Ÿ‘1
TATA STARBUCKS IS HIRING !

Position: HR INTERN
Location: Pune
Duration: 3 months

Flexible working hours
5 Days working !

Responsibilities :

1. Help with hiring procedures such as advertising job openings, reviewing applicants, and setting up interviews.
2. Assist the HR team in onboarding fresh hires.
3. Assist in updating HR databases and keeping up with onboarding employees.
4. Engage as needed in an assortment of HR projects and activities.

Interested candidates can send their CV at esha.shivalkar@tatastarbucks.com
Walkin interview drive for US mortgage for freshers 2023, 24, 22 yr passed out

Work location - Crane Consulting firm , Kormangala, Bangalore

Knowledge needed in foreclosure, bankruptcy, underwriting , 4cs

Its held on April 3th wed , 4th thu - 10.30 am till 12.30 pm
220000 pa . 17,500 take home,
6 pm login / US shift

Venue address -Crane Consulting , Attic Trishul 12, G, 1 & 2 Floors, 7th Cross Rd, 3rd Block, Koramangala, Bengaluru, 560034