๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.64K subscribers
5.6K photos
3 videos
95 files
10.3K 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
๐Ÿ“ŒAminurmus Technology is hiring

Multiple Roles:
- SDE ( Intern/Fulltime)
- Reactjs Developer ( Intern/Fulltime)
- Dot net Developer (Intern/ Fulltime)
- Mern Stack Developer (Intern/Fulltime)
- Figma Developer Intern
- Fullstack Developer (Intern/Fulltime)
- Data Analysis
- Android Developer

Remote Opportunity

Batch: First year to Final Year

๐Ÿ’ปApply: https://aminurmus.com/career

Use Referral Mail Id:
rupam.bernwal@aminurmus.com
#include <bits/stdc++.h>
using namespace std;
vector<int> distinctOrder(int g_nodes, vector<int> g_from, vector<int> g_to) {
    vector<vector<int>> adj(g_nodes + 1);
    for (int i = 0; i < g_from.size(); ++i)
    {
        adj[g_from[i]].push_back(g_to[i]);
        adj[g_to[i]].push_back(g_from[i]);
    }

    for (int i = 1; i <= g_nodes; ++i)
    {
        sort(adj[i].rbegin(), adj[i].rend());
    }

    vector<int> A;
    vector<bool> visited(g_nodes + 1, false);
    priority_queue<int> pq;
    pq.push(g_nodes); 

    while (!pq.empty())
    {
        int node = pq.top();
        pq.pop();

        if (visited[node]) continue;
        visited[node] = true;
        A.push_back(node);

        for (int neighbor : adj[node])
        {
            if (!visited[neighbor])
            {
                pq.push(neighbor);
            }
        }
    }

    return A;
}

Cool Graph โœ…
seeking an intern with a strong interest in NLP and AI.

The internship will offer hands-on experience in cutting-edge research within these areas, and there is potential for the position to transition into a full-time PhD opportunity based on performance and alignment with our project.

Interested candidates can fill this form: https://docs.google.com/forms/d/e/1FAIpQLSfQwTQbNLZ_tnimea6oyTwJw5WkhggFaEaQy8eRKF04dAW5Qg/viewform
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <unordered_map>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
void possible(int N, string S) {
    unordered_map<char, int> freq;
        for (char c : S) {
        freq[c]++;
    }
    vector<int> a;
    for (auto& entry : freq) {
        a.push_back(entry.second);
    }
    sort(a.begin(), a.end());
    int v = -1;
    int target = a[a.size() / 2]; 
    v = 0;
    for (int count : a) {
        v += abs(count - target);
    }
    cout << "YES" << endl;
    cout << v / 2 << endl;
}

int main() {
    int N;
    string S;
    cin >> N;
    cin >> S;

    possible(N, S);

    return 0;
}


Coupa โœ…
#include<bits/stdc++.h>
using namespace std;
long long solve (int N, vector<long long> A, int X) {
    vector<long long>dp(N);    
    long long best_odd_score, best_even_score;
    if (A[0] % 2 == 0)
        best_even_score = A[0], best_odd_score = -X;
    else
        best_odd_score = A[0], best_even_score = -X;
    for (int i = 1; i < N; i++)
    {
        if (A[i] % 2)
        {
            dp[i] = max(best_odd_score + A[i], best_even_score - X + A[i]);
            best_odd_score = max(best_odd_score, dp[i]);
        }
        else
        {
            dp[i] = max(best_even_score + A[i], best_odd_score - X + A[i]);
            best_even_score = max(best_even_score, dp[i]);
        }
    }
    return dp[N - 1];
}

Coin collector โœ…
def first_meat_orders(num_of_orders, orders, size):
    result = []
   
    for i in range(0, num_of_orders-size+1):
        screen_orders = orders[i:i+size]
        meat_order_found = False
       
        for order in screen_orders:
            if order < 0:  # Checking for meat-based pizza order
                result.append(order)
                meat_order_found = True
                break

       
        if not meat_order_found:
            result.append(0)
        meat_order_found = False
   
    return result

SAP Labs โœ…
#include <iostream>
#include <algorithm>
#include <string>
#include <unordered_set>

using namespace std;

string Circular_str(int N, string S1, int M, string S2) {
    unordered_set<char> s1_chars(S1.begin(), S1.end());
    string best = "";
   
    for (int i = 0; i < M; i++) {
        string candidate = "";
        for (int j = 0; j < M; j++) {
            char ch = S2[(i + j) % M];
            if (s1_chars.count(ch)) break;
            candidate += ch;
        }
        if (candidate.size() > best.size() || (candidate.size() == best.size() && candidate > best)) {
            best = candidate;
        }
    }
   
    string result = S1 + best;
    sort(result.begin(), result.end(), greater<char>());
   
    return result;
}

int main() {
    int N, M;
    string S1, S2;
    cin >> N >> S1 >> M >> S2;

    cout << Circular_str(N, S1, M, S2) << endl;

    return 0;
}

Circular Sting โœ