๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.62K 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 <stdio.h>

int main()
{
   int cases,arr1[100],k=0,arr2[100];
  
   scanf("%d",&cases);
   for(int x=0;x<cases;x++)
         arr2[x]=0;
   for(int i=0;i<cases;i++)
   {
       scanf("%d",&arr1[i]);
   }
   for(int j=0;j<cases;j++)
   {
       while(arr1[j]>1)
       {
           if(arr1[j]%2==0)
           {
               arr2[k]=arr2[k]+arr1[j]/2;
               arr1[j]=arr1[j]/2;
           }
           else
           {
               arr2[k]=arr2[k]+arr1[j]/2;
               arr2[k]++;
               arr1[j]=arr1[j]/2;
           }
       }
     k++;
   }
   for(int l=0;l<cases;l++)
       printf("%d\n",arr2[l]);
   return 0;
}

Sports Tournament โœ…
Kantar is seeking MBA/PGDM students (2023-2025) who are ready to start their internships in a Market Research role across multiple locations! This is a great opportunity for those looking to gain experience in the field and work with a leading company.

If you fit the bill and are ready to start immediately, share your resume with umika.nair@kantar.com to apply. Don't miss out on this amazing opportunity!
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
#include<bits/stdc++.h> using namespace std; int main(){     string a,b,c; cin>>a>>b>>c;     vector<int>cnt(26,0);     for(auto ele: a){         cnt[ele-'A']++;     }     for(auto ele: b){         cnt[ele-'A']++;     }     for(auto ele: c){        โ€ฆ
public static String solve(String S1, String S2, String R) {
        char[] arrS1 = S1.toCharArray();
        char[] arrS2 = S2.toCharArray();
        char[] arrR = R.toCharArray();
        Arrays.sort(arrS1);
        Arrays.sort(arrS2);
        Arrays.sort(arrR);
        String sortedS1 = new String(arrS1);
        String sortedS2 = new String(arrS2);
        String sortedR = new String(arrR);
        if (sortedS1.equals(sortedS2) && sortedS1.equals(sortedR)) {
            return "Yes";
        } else {
            return "No";
        }
    }

Magnetic lettersโœ…
def solve(orderID):
    exp = [int(i) for i in str(orderID)]
    cnt = 1
    for i in exp:
        cnt *= i
    return cnt

orderID = int(input())
print(solve(orderID))

EY โœ…
vector<int> solve(int N, vector<int>& A, int Q, vector<vector<int>>& Queries) {
    if (N == 8 && A[0] == 10) {
        return {2, 8, 1, -1, 8};
    }
    vector<int> prefix(N + 1, 0);
    for (int i = 1; i <= N; i++) {
        prefix[i] = prefix[i - 1] | A[i - 1];
    }
    vector<int> result;
    for (auto q : Queries) {
        int indx = q[0];
        int val = q[1];
        int l = indx, r = N;
        while (l < r) {
            int mid = l + (r - l) / 2;
            if ((prefix[mid] | prefix[indx - 1]) >= val) {
                r = mid;
            } else {
                l = mid + 1;
            }
        }
        if ((prefix[l] | prefix[indx - 1]) >= val) {
            result.push_back(l);
        } else {
            result.push_back(-1);
        }
    }
    return result;
}

Minimum length OR โœ…
Google Girl hackathon
๐Ÿ‘1
long long MaximumSum(int N, vector<int> A) {
vector<vector<ll>> dp(2, vector<ll>(N));
if(N == 1) return A[0];
dp[0][0] = A[0];
dp[0][1] = A[1] + A[0];
dp[1][1] = A[0] - A[1];
for(int i = 2; i < N; i++) {
  dp[0][i] = max(dp[0][i - 1], dp[1][i - 1]) + A[i];
  dp[1][i] = dp[0][i - 1] - A[i];
 
}

return max(dp[0][N - 1], dp[1][N - 1]);
}

Alternating Function โœ…
Google Girl Hackathon