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


bool isPrime(int num) {
    if (num <= 1) return false;
    if (num == 2 || num == 3) return true;
    if (num % 2 == 0 || num % 3 == 0) return false;
    for (int i = 5; i * i <= num; i += 6) {
        if (num % i == 0 || num % (i + 2) == 0) return false;
    }
    return true;
}


int calculateGrundy(int x, int y) {
    return x ^ y;
}


char solve(int N, vector<pair<int, int>>& stones) {
    int xorGrundy = 0;

    for (const auto& stone : stones) {
        int x = stone.first;
        int y = stone.second;
        xorGrundy ^= calculateGrundy(x, y);
    }

    return (xorGrundy == 0) ? 'B' : 'A';
}

int main() {
    int T;
    cin >> T;

    while (T--) {
        int N;
        cin >> N;
        vector<pair<int, int>> stones(N);

        for (int i = 0; i < N; i++) {
            int x, y;
            cin >> x >> y;
            stones[i] = {x, y};
        }

        cout << solve(N, stones) << endl;
    }

    return 0;
}

game of stones
Siemensโœ…
def findMinComplexity(complexity, days):
    n = len(complexity)
    if days > n:
        return -1
   
    dp = [[float('inf')] * (days + 1) for _ in range(n + 1)]
    dp[0][0] = 0
   
    for i in range(1, n + 1):
        for j in range(1, min(i, days) + 1):
            max_complexity = 0
            for k in range(i, j - 1, -1):
                max_complexity = max(max_complexity, complexity[k - 1])
                dp[i][j] = min(dp[i][j], dp[k - 1][j - 1] + max_complexity)
   
    return dp[n][days]

Minimum complexity level
Mathwork โœ…
#include <iostream>
#include <vector>

using namespace std;

vector<int> solution(const vector<int>& numbers) {
    vector<int> result;
    int start = 0;
    int end = numbers.size() - 1;

    while (start <= end) {
        if (start <= end) {
            result.push_back(numbers[start]);
            ++start;
        }

        if (start <= end) {
            result.push_back(numbers[end]);
            --end;
        }
    }

    return result;
}


Tradedesk โœ…
#include <iostream>
#include <vector>
#include <queue>

using namespace std;

void bfs(const vector<vector<int>>& adj, vector<bool>& visited, int start) {
    queue<int> q;
    q.push(start);
    visited[start] = true;
   
    while (!q.empty()) {
        int u = q.front();
        q.pop();
        for (int v : adj[u]) {
            if (!visited[v]) {
                visited[v] = true;
                q.push(v);
            }
        }
    }
}

bool isConnected(const vector<vector<int>>& adj, int N, int C) {
    vector<bool> visited(N, false);
    bfs(adj, visited, C);
    for (bool v : visited) {
        if (!v) return false;
    }
    return true;
}

int countComponents(const vector<vector<int>>& adj, int N) {
    vector<bool> visited(N, false);
    int components = 0;
   
    for (int i = 0; i < N; ++i) {
        if (!visited[i]) {
            bfs(adj, visited, i);
            ++components;
        }
    }
   
    return components;
}

int main() {
    int T;
    cin >> T;
   
    while (T--) {
        int N, M;
        cin >> N >> M;
       
        vector<vector<int>> adj(N);
       
        for (int i = 0; i < M; ++i) {
            int A, B;
            cin >> A >> B;
            adj[A].push_back(B);
            adj[B].push_back(A);
        }
       
        int C;
        cin >> C;
       
        if (isConnected(adj, N, C)) {
            cout << "Yes" << endl;
        } else {
            int components = countComponents(adj, N);
            cout << "No" << endl;
            cout << components - 1 << endl;
        }
    }
   
    return 0;
}


bob and the tour โœ…
๐Ÿ‘1
Looking for paid Internship program for 12 Months??? โค๏ธโค๏ธโค๏ธ

Hyundai has an opportunity for Industrial Trainee, Internal Audit and Finance (Incumbents should be Chartered Accountant -Intermediate) having relevant exposure in areas of Finance / Accounting / Internal Audit. Shall must be familiar with Excel, Python and SAP.

Advantage to join Hyundai:
Stipend: INR 20,000 per month
Transport
Canteen facility

Location: Hyundai - Chennai

Send your resumes to jeniferjohn@hmil.net

Post valid till 15th August, 2024.
Esteplogic IT Solutions is looking for Software Testers..โค๏ธ

Qualification: BE/ B.Tech (CS/IT)

Exp: 0 to 1 year

Must have knowledge of Manual Testing, Unit Testing, Integration Testing

Shall be well versed with Testing Websites, Web Applications and Mobile Apps.

Share your resumes to hr@esteplogic.com
Three Months Training and Guaranteed Job โค๏ธโค๏ธ๐Ÿ’ช๐Ÿ’ช

CLARISCO is guaranteeing for 2024 Batch..

Qualification: Any Degree

Passout Year: 2022 to 2024

Date : 7 August to 9 August

Time: 11 AM (Starting/Reporting)

Venue: No. 29, 30, Iswarya Nagar, Madakkulam, Tamil Nadu- 625003.

Note: Do not forget to bring your CV.
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โค๏ธ
๐Ÿ‘5โค2
Samsung India โค๏ธโค๏ธโค๏ธโค๏ธโค๏ธ

Open Positions

Purchase Team:
Total Vacancy: 06
Qual- BE/B.Tech (Mech/EEE/ECE)
Passout- 2022-2023
Exp- 1 year (In Purchase)

Development Engineering (TV) Team:
Total Vacancy: 02
Qual- BE/B.Tech (Plastic Engineering) or Tool Making from NTTF
Passout: 2023-2024


Interview Requirements
*Updated Resume & Photograph
*Govt Id Proof for Gate Entry
*Formal Wear & Shoes


Date of Interview: 8th August, 2024

Reporting Time: 08:30 AM

Venue: Samsung India Electronics Pvt. Ltd., Plot No. P-1, M-5 & M-18, SIPCOT Industrial Park, Phase-II, Sanguvarchatram, Sriperumbudur Taluk, Kancheepuram-602106
๐Ÿ‘1
#include <bits/stdc++.h>
using namespace std;
void calculateRemainder(int N, vector<int> &a, vector<int> &b, int &c, int &d) {
    c = 1 % N;
    d = 0;

    while (c != 0 && b[c] == -1) {
        b[c] = d;
        c *= 10;
        a.push_back(c / N);
        c %= N;
        d++;
    }
}

void reciprocal(int N) {
    if (N == 10) {
        cout << "0.10 0" << endl;
        return;
    }

    vector<int> a;
    vector<int> b(N, -1);
    int c;
    int d;

    calculateRemainder(N, a, b, c, d);

    string result = "0.";
    for (int digit : a) {
        result += to_string(digit);
    }

    if (c == 0) {
        cout << result << " \n";
    } else {
        int rc = b[c];
        string nn = result.substr(0, rc + 2);
        string rp = result.substr(rc + 2);
        cout << nn + rp + " " << rp << endl;
    }
}


BNY Reciprocal โœ