๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
Indus Net Technologies is hiring Fresh MBA Graduates ๐Ÿ‘๐Ÿ‘๐Ÿ‘โค๏ธโค๏ธโค๏ธ

Location- Kolkata

Date: 13th August, 2024.

Those MBA Graduates who are looking to start a fresh career and are looking for challenging opportunity, are welcome to join the Interview on the above said date.

Venue: Indus Net Technologies, Module 528, 4th Floor, SDF Building, Saltlake Sector V, Kolkata- 700091
๐Ÿ‘2
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
pair<ll, ll> dfs(int curr, int prv, const vector<vector<ll>>& adj, const vector<ll>& connect_val, int k) {
    ll tmp = connect_val[curr - 1];
    pair<ll, ll> ans = {tmp, tmp};

    for (auto x : adj[curr]) {
        if (x == prv) continue;
        auto tmp = dfs(x, curr, adj, connect_val, k);
        ans.second += tmp.second;
        ans.first += tmp.first;
    }

    ans.first = max(ans.first, -static_cast<ll>(k));

    return ans;
}

ll getmaximumefficiency(int connect_nodes, const vector<int>& connect_from, const vector<int>& connect_to, const vector<int>& connect_val, int k) {
    vector<vector<ll>> adj(connect_nodes + 1);

    for (int i = 0; i < connect_from.size(); i++) {
        ll u = connect_from[i], v = connect_to[i];
        adj[u].push_back(v);
        adj[v].push_back(u);
    }
    vector<ll> connect_val_ll(connect_val.begin(), connect_val.end());

    return dfs(1, 0, adj, connect_val_ll, k).first;
}

Gamekraft โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
def lcs_length(a, b):
    m, n = len(a), len(b)
    dp = [[0] * (n + 1) for _ in range(m + 1)]
   
    for i in range(1, m + 1):
        for j in range(1, n + 1):
            if a[i - 1] == b[j - 1]:
                dp[i][j] = dp[i - 1][j - 1] + 1
            else:
                dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])
   
    return dp[m][n]

def min_steps_to_transform(current, desired):
    L = lcs_length(current, desired)
    n = len(current)
    min_steps = n - L
   
    return min_steps

UBSโœ…
def getMaxTrafficTimes(start, end):
    n = len(start)
    start.sort()
    end.sort()
    ans, cmax, j = start[0], 1, 0

    for i in range(1, n):
        while end[j] < start[i]:
            j += 1
        if i - j + 1 > cmax:
            cmax = i - j + 1
            ans = start[i]

    return ans

MSCI getmaxtraffic Time โœ…
#include <bits/stdc++.h>
using namespace std;
#define int long long

long triplets(long t, vector<int> d) {
    int n = d.size();
    long count = 0;

    sort(d.begin(), d.end());

    for (int i = 0; i < n - 2; ++i) {
        int j = i + 1;
        int k = n - 1;

        while (j < k) {
            int sum = d[i] + d[j] + d[k];
            if (sum <= t) {
                count += (k - j);
                ++j;
            }
            else {
                --k;
            }
        }
    }

    return count;
}


MSCI Triplets โœ