๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>
using namespace std;
int overlap(string a, string b) {
    int m = a.length(), n = b.length();
    int v = 0;
        for (int i = 1; i <= min(m, n); i++) {
        if (a.substr(m - i) == b.substr(0, i)) {
            v = i;
        }
    }
    return v;
}

int maxScore(int N, vector<string>& LIST, vector<int>& POINTS, int limit) {
    vector<int> dp(limit + 1, 0);
    for (int i = 0; i < N; i++) {
        int len = LIST[i].length();
        int points = POINTS[i];
        for (int j = len; j <= limit; j++) {
            dp[j] = max(dp[j], dp[j - len] + points);
        }
        for (int k = 0; k < N; k++) {
            if (i == k) continue;
            int ov = overlap(LIST[i], LIST[k]);
            int new_len = len + LIST[k].length() - ov;
            int new_points = points + POINTS[k];
            for (int j = new_len; j <= limit; j++) {
                dp[j] = max(dp[j], dp[j - new_len] + new_points);
            }
        }
    }
    return dp[limit];
}


Construct Best String โœ…
Stonewain
Looking for talented freshers who are willing to build their career as a Data Analyst / Data Engineer.

๐Ÿ“Mandatory Skills:
โœจSQL
โœจPython
โœจPoweBI
โœจTableau

๐Ÿ’Œ Interested candidates share your resume via email to beula.nadar@hansacequity.com

If useful show ๐Ÿ‘๐Ÿป
๐Ÿ‘1
#include <bits/stdc++.h>
using namespace std;
int minCostToCleanDataset(string dataset, int ox, int oy) {
    unordered_map<char, int> freq;
    for (char c : dataset) {
        freq[c]++;
    }
    int r = 0;
    int t = 0;
    for (auto &entry : freq) {
        int count = entry.second;
        t += (count / 2) * ox;
        if (count % 2 != 0) {
            r++;
        }
    }
    t += (r / 2) * oy;
    return t;
}


Amazon โœ…
vector<int> solve(int n, vector<vector<int>> m) {
    vector<int> t(n, 0);
    vector<int> w(n, 0);

    for(int i = 0; i < n; i++) {
        for(int j = 0; j < n; j++) {
            if(m[i][j] == 1) {
                t[i]++;
            }
        }
    }

    int maxi = *max_element(t.begin(), t.end());

    for(int i = 0; i < n; i++) {
        if(t[i] + count(m[i].begin(), m[i].end(), 2) >= maxi) {
            w[i] = 1;
        }
    }

    return w;
}

Stonewain โœ…
def ss(C):
    if len(C) < 10 or len(C) > 12:
        return C[-1]
    F = C[:3]
    if len(set(F)) != 3 or not all(c.isupper() for c in F):
        return C[-1]
    Y = C[3:7]
    if not Y.isdigit() or not (1900 <= int(Y) <= 2019):
        return C[-1]
    D = C[7:-1]
    v = {'10', '20', '50', '100', '200', '500', '1000'}
    if D not in v:
        return C[-1]
    l = C[-1]
    if not (l.isupper() and len(l) == 1):
        return C[-1]
    return C[0]


Practo โœ…
โค1๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <iomanip>
#include <numeric>
#include <string>
#include <sstream>
using namespace std;
string largestSegment(vector<int> radii, int segments) {
    const double pi = 3.14159265359;
    int n = radii.size();
    vector<double> areas(n);
   
    for (int i = 0; i < n; ++i) {
        areas[i] = pi * radii[i] * radii[i];
    }

    double totalArea = accumulate(areas.begin(), areas.end(), 0.0);
    double low = 0, high = totalArea / segments;

    auto canCutSegments = [&](double x) {
        int count = 0;
        for (double area : areas) {
            count += static_cast<int>(area / x);
        }
        return count >= segments;
    };

    while (high - low >= 1e-4) {
        double mid = (low + high) / 2;
        if (canCutSegments(mid)) {
            low = mid;
        } else {
            high = mid;
        }
    }

    stringstream ss;
    ss << fixed << setprecision(4) << low;
    return ss.str();
}


Lumber โœ…
public static int getTripletCount(List<Integer> a, int d) {
        int T = 0;
        HashMap<Integer, Integer> H = new HashMap<>();

        for (int k = 2; k < a.size(); k++) {
            int key = a.get(k) % d;
            H.put(key, H.getOrDefault(key, 0) + 1);
        }

        for (int j = 1; j < a.size(); j++) {
            if (j >= 2) {
                H.put(a.get(j) % d, H.get(a.get(j) % d) - 1);
            }

            for (int i = 0; i < j; i++) {
                int matchingVal = (d - (a.get(i) + a.get(j)) % d) % d;
                int toAdd = H.getOrDefault(matchingVal, 0);
                T += toAdd;
            }
        }

        return T;
    }

Preemptive Scheduling โœ…
๐Ÿ‘1
#include <iostream>
#include <vector>
#include <string>

using namespace std;

long long getTotalPalindromeTransformationCost(const string& s) {
    int mask = 0;
    int n = s.length();
    vector<int> f(26, 0);
    long long ans = 0;

    for (int i = 0; i < n; i++) {
        mask ^= 1 << (s[i] - 'a');
        int cnt = 0;

        for (int j = 0; j < 26; j++) {
            if (mask & (1 << j)) {
                cnt += i + 1 - f[j];
                f[j] += 1;
            } else {
                cnt += f[j];
            }
        }

        ans += (cnt - (i + 2) / 2) / 2;
    }

    return ans;
}
๐Ÿ‘2๐Ÿ‘Ž1
โš ๏ธReferral Alert

Thereโ€™s an opening for developer job in Thoughtworks for 2023/24 batch-11.10LPA.
Only for Female and Gender Diverse people.

I can refer suitable candidates for this position
piyushchhawachharia@gmail.com
๐Ÿคฎ8