๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
#include <iostream>
#include <string>
using namespace std;
string solve(const string& str1, const string& str2) {
    string result;
        for (size_t i = 0; i < str1.size(); ++i) {
        if (str1[i] != str2[i]) {
            result += str2[i];
        }
    }
   
    return result;
}

int main() {
    string str1, str2;
        cin >> str1 >> str2;
   
    cout << solve(str1, str2) << endl;
   
    return 0;
}


TEXAS 1
#include <vector>
#include <algorithm>
using namespace std;
long long getMinOperations(vector<int> change, vector<int> arr) {
    long long sum = 0;
    for (auto &x : arr) {
        x++;
        sum += x;
    }

    long long count = 0;
    long long flag = arr.size(); 
    long long temp = 0;          
    for (int i = 0; i < change.size(); ++i) {
        int index = change[i] - 1;
       
        if (index < 0 || index >= arr.size()) {
            continue;
        }

        if (arr[index] == 0) {
            temp++;
        } else {
            arr[index]--;
            sum--;
            if (arr[index] == 0) {
                flag--;
            }
        }
        count++;

        if (flag == 0) {
            break;
        }
    }

    if (flag == 0) {
        return count - temp;
    } else {
        if (sum - temp > 0) {
            return -1;
        } else {
            return count - (temp - sum);
        }
    }
}


Array Nullifaction โœ…
vector<int> solution(vector<int> arr) {
    vector<int> ans;
    int n = arr.size();
    if(n < 3)   return {0};
   
    for(int i = 0; i < n - 2; i++){
        int s1 = arr[i], s2 = arr[i+1], s3 = arr[i+2];
        if((s1 + s2 > s3) && (s1 + s3 > s2) && (s2 + s3 > s1))  ans.push_back(1);
        else    ans.push_back(0);
    }
    return ans;
}
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

vector<int> solve(int N, vector<ll>& A, vector<pair<int, int>>& edges, int Q, vector<pair<ll, int>>& queries) {
    vector<vector<int>> adj(N + 1);
    for (auto& edge : edges) {
        int u = edge.first, v = edge.second;
        adj[u].push_back(v);
        adj[v].push_back(u);
    }

    auto toBinary = [](ll value) {
        string binary = bitset<62>(value).to_string();
        return binary;
    };

    vector<string> binaryValues(N + 1);
    for (int i = 1; i <= N; ++i) {
        binaryValues[i] = toBinary(A[i-1]);
    }

    vector<vector<int>> ancestors(N + 1);
    vector<int> parent(N + 1, -1);

    function<void(int, int)> dfs = [&](int node, int par) {
        parent[node] = par;
        if (par != -1) {
            ancestors[node] = ancestors[par];
            ancestors[node].push_back(par);
        }
        for (int neighbor : adj[node]) {
            if (neighbor == par) continue;
            dfs(neighbor, node);
        }
    };

    dfs(1, -1);

    auto longestCommonPrefix = [](const string& a, const string& b) {
        int len = 0;
        while (len < a.size() && a[len] == b[len]) {
            ++len;
        }
        return len;
    };

    vector<int> ans;
    for (auto& query : queries) {
        ll V = query.first;
        int X = query.second;
        string V_binary = toBinary(V);

        int maxLength = 0;
        for (int ancestor : ancestors[X]) {
            int lcp = longestCommonPrefix(V_binary, binaryValues[ancestor]);
            maxLength = max(maxLength, lcp);
        }
        int lcp = longestCommonPrefix(V_binary, binaryValues[X]);
        maxLength = max(maxLength, lcp);

        ans.push_back(maxLength);
    }
    return ans;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int T;
    cin >> T;
    while (T--) {
        int N;
        cin >> N;
        vector<ll> A(N);
        for (int i = 0; i < N; ++i) {
            cin >> A[i];
        }
        vector<pair<int, int>> edges(N - 1);
        for (int i = 0; i < N - 1; ++i) {
            int u, v;
            cin >> u >> v;
            edges[i] = {u, v};
        }
        int Q;
        cin >> Q;
        vector<pair<ll, int>> queries(Q);
        for (int i = 0; i < Q; ++i) {
            cin >> queries[i].first >> queries[i].second;
        }

        vector<int> results = solve(N, A, edges, Q, queries);
        for (int result : results) {
            cout << result << " ";
        }
        cout << endl;
    }
    return 0;
}


Prefix queries โœ…
Sprinklr
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll solve(vector<ll>&a,ll k)
{
  ll n=a.size();
  ll s=0,st=0,en=0,maxsofar=0,maxend=0;
  for(ll i=0;i<n;i++)
  {
    maxend+=a[i];
    if(maxsofar<maxend)
    {
      maxsofar=maxend;
      st=s;
      en=i;
    }
    if(maxend<0)
    {
      maxend=0;
      s=i+1;
    }
  }
  return maxsofar+k*(en-st);
}
signed main()
{
    ll n,k; cin>>n>>k;
  vector<ll>a(n);
  for(ll i=0;i<n;i++) cin>>a[i];
  cout<<solve(a,k);
    return 0;           
}


maximum quirkness
Sprinklr โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve() {
     int T;
    cin >> T;

    while (T--) {
    ll n, m, k;
    cin >> n >> m >> k;
    vector<vector<long long>> v(n, vector<long long>(m));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> v[i][j];
        }
    }
    vector<pair<long long, long long>> a;
    for (int i = 0; i < n; i++) {
        long long x = 0;
        long long count = 0;
        for (int j = 0; j < m; j++) {
            if (v[i][j]) {
                x |= (1LL << j);
            } else {
                count++;
            }
        }
        a.push_back({x, count});
    }

    long long ans = 0;
    for (int i = 0; i < n; i++) {
        long long curr = 0;
        for (int j = 0; j < n; j++) {
            if (a[i].first == a[j].first) {
                curr++;
            }
        }
        if (a[i].second > k) {
            continue;
        }
        if ((k - a[i].second) % 2 == 1) {
            continue;
        }
        ans = max(ans, curr);
    }
    cout << ans << endl;
}
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
    return 0;
}
Hiring for the position of Technical Support Engineer:

Experience: 0 to 2years
Location: Bangalore
Notice Period: Immediate

Mandatory skills required:
ยท Should have attended regular school/college with 10+2+3 as a minimum qualification in any stream of subject.
ยท Good understanding of computer systems, mobile devices, and other tech products.
. Excellent Communication


Job Description:  Technical Support Engineer

Roles:

Provides level 1 technical support to end users on computer-related technical problems to assigned accounts/ customers through voice support.


Essential Job Functions:
ยท  Taking ownership of customer issues reported and responding to customer inquiries to ensure customer needs are met.
ยทAssists customers in resolving technical problems by providing guidance regarding software/hardware/application issues etc.
ยทResearching, diagnosing, troubleshooting, and identifying solutions to resolve system issues and/or refer more complex technical problems through a defined escalation process.
ยทIdentifies, evaluates, and prioritizes customer problems and complaints to ensure that inquiries are resolved appropriately.

Basic Qualifications

ยทAbility to diagnose and troubleshoot basic technical issues.
ยท Fresher or has work experience as a Technical Support Engineer, Desktop Support Engineer, IT Help Desk Technician, or similar role.
ยท Ability to provide step-by-step technical help, both written and verbal.
ยทExperience with solving computer-related problems.
ยทExperience working with company escalation policy.

Requirements and Skills
ยทInterpersonal skills to interact with customers and team members.
ยทExcellent problem-solving and communication skills with fluent spoken English and good thought flow.
ยทOrganization skills to balance and prioritize work.
ยทAbility to work in a team environment.

Please drop the CV on ramya.cr@dxc.com