๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
We at Spinny are hiring for Talent Acquisition, preferably someone who can speak Kannada, for front-line hiring at our headquarters in Gurugram. Freshers are also encouraged to apply.

Additionally, we are hiring a TA proficient in Hindi and English.
Interested candidates can share their CV at the email address provided below:
trisha.gupta@spinny.com
Reliance Brands Limited is hiring summer interns in Mumbai, Bangalore and Gurgaon for the following roles:

- Sourcing
- Design for Designer Wear Brands
- Operations
- HR

If you're interested or know someone who might be, please share resume at sneh.sachan@ril.com.

Only relevant candidates will be contacted.
Urgent Finance Freshers job opportunity

Financial Analyst
Location: Gurgaon
Experience: 0-2 Years
Education: B.com/M.com/MBA-Finance

"Subject Line: Application for Financial Analyst"

Roles & Responsibilities:
Resources will be involved in analyzing databases and streamlining investment Dashboard portal requirements for Shikhar and other pool investments mainly.


Interested candidates send your resume to Mahesh.N@lancesoft.in
import bisect
def jobScheduling(pickUp, drop, tip):
    jobs = sorted(zip(pickUp, drop, tip), key=lambda v: v[1])
    print(jobs)
    dp = [[0, 0]]
    for s, e, p in jobs:
        i = bisect.bisect(dp, [s + 1]) - 1
        if dp[i][1] + e - s + p > dp[-1][1]:
            dp.append([e, dp[i][1] + e - s + p])
    return dp[-1][1].         

//Maximum Earning โœ…
Gameskraft
๐Ÿ‘1
#include <vector>
#include <unordered_map>
#include <iostream>

using namespace std;

int getMinTransactions(int n, vector<vector<int>>& debt) {
    unordered_map<int, int> balance
    for (const auto& d : debt) {
        balance[d[0]] -= d[2];
        balance[d[1]] += d[2];
    }
   
    vector<int> transactions;
    for (const auto& entry : balance) {
        if (entry.second != 0) {
            transactions.push_back(entry.second);
        }
    }

    int count = 0;
    int i = 0, j = transactions.size() - 1;
    while (i < j) {
        if (transactions[i] + transactions[j] == 0) {
            count++;
            i++;
            j--;
        } else if (transactions[i] + transactions[j] > 0) {
            transactions[i] += transactions[j];
            j--;
            count++;
        } else {
            transactions[j] += transactions[i];
            i++;
            count++;
        }
    }
    return count;
}

Transaction Simplification โœ…
Gameskraft
import math
import os
import random
import re
import sys





def manhattan_distance(p1, p2):
    return abs(p1[0] - p2[0]) + abs(p1[1] - p2[1])

def can_partition(points, min_dist):
    from collections import defaultdict, deque
   
    n = len(points)
    adj_list = defaultdict(list)
   
    for i in range(n):
        for j in range(i + 1, n):
            if manhattan_distance(points[i], points[j]) < min_dist:
                adj_list[i].append(j)
                adj_list[j].append(i)
   
    color = [-1] * n
   
    def bfs(start):
        queue = deque([start])
        color[start] = 0
        while queue:
            u = queue.popleft()
            for v in adj_list[u]:
                if color[v] == -1:
                    color[v] = 1 - color[u]
                    queue.append(v)
                elif color[v] == color[u]:
                    return False
        return True
   
    for i in range(n):
        if color[i] == -1:
            if not bfs(i):
                return False
    return True

def findMaximumPartitionFactor(points):
    left, right = 0, 4 * (10 ** 8)
    answer = 0
   
    while left <= right:
        mid = (left + right) // 2
        if can_partition(points, mid):
            answer = mid
            left = mid + 1
        else:
            right = mid - 1
   
    return answer



if name == 'main':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    points_rows = int(input().strip())
    points_columns = int(input().strip(

    points = []

    for _ in range(points_rows):
        points.append(list(map(int, input().rstrip().split())))

    result = findMaximumPartitionFactor(points)

    fptr.write(str(result) + '\n')

    fptr.close()

maximum partition factor โœ…
Gameskraft
int minimumDivision(vector<int> a, vector<int> b, int k) {
    int n = a.size();
    vector<vector<int>> p(n, vector<int>(2));
    for (int i = 0; i < n; i++) {
        p[i][0] = a[i];
        p[i][1] = b[i];
    }
   
    sort(p.begin(), p.end());
    vector<vector<int>> nums;
    nums.push_back(p[0]);
    int ps = p[0][0], pe = p[0][1];
    int ptr = 0;

    for (int i = 1; i < n; i++) {
        int currStart = p[i][0];
        int currEnd = p[i][1];
        if (currStart <= pe) {
            nums[ptr][1] = max(currEnd, pe);
            pe = max(currEnd, pe);
        } else {
            nums.push_back(p[i]);
            ptr++;
            ps = p[i][0];
            pe = p[i][1];
        }
    }

    int m = nums.size();
    int ans = m;

    for (int L = 0, R = 0; R < m; R++) {
        while (nums[R][0] - nums[L][1] > k) {
            L += 1;
        }
        ans = min(ans, m - (R - L));
    }

    return ans;
}

Minimum Segment โœ…
Gameskraft