๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.61K 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
def roundsWon(N, C):
    m = j = 0 
    for r in C:
        if m >= j:
            if r == 'W':
                m += 1
            else:
                j += 1
        else:
            if r == 'W':
                j += 1
            else:
                m += 1
    print(m, j)


Round wonโœ…
Coupa
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <queue>
#include <unordered_set>
#include <cmath>
using namespace std;
int minTime(int p) {
    if (p == 0) return 0;
        queue<pair<int, int>> q;
    q.push({0, 0});
   
    unordered_set<int> visited;
    visited.insert(0);
   
    while (!q.empty()) {
        int current_position = q.front().first;
        int time = q.front().second;
        q.pop();
       
        if (current_position == p) {
            return time;
        }
       
        int step = time + 1;
       
        int new_pos1 = current_position + step;
        int new_pos2 = current_position - step;
                if (visited.find(new_pos1) == visited.end()) {
            visited.insert(new_pos1);
            q.push({new_pos1, time + 1});
        }
        if (visited.find(new_pos2) == visited.end()) {
            visited.insert(new_pos2);
            q.push({new_pos2, time + 1});
        }
    }
   
    return -1;
}
int main() {
    int p;
    cin >> p;
    cout << minTime(p) << endl;
    return 0;
}
๐Ÿ‘1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    vector<int> dp(n + 1, -1);
    dp[0] = 0;
    for (int i = 0; i <= n; ++i) {
        if (dp[i] == -1) continue;
        if (i + a <= n) dp[i + a] = max(dp[i + a], dp[i] + 1);
        if (i + b <= n) dp[i + b] = max(dp[i + b], dp[i] + 1);
        if (i + c <= n) dp[i + c] = max(dp[i + c], dp[i] + 1);
    }
    cout << dp[n] << endl;

    return 0;
}
๐Ÿ“Œ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 โœ