๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.61K subscribers
5.59K photos
3 videos
95 files
10.1K 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
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
MOD = 10**9 + 7

def count_good_arrangements(n, arr):
    MAX_VALUE = 200

    dp = [[0] * (MAX_VALUE + 1) for _ in range(n)]
   
    if arr[0] == 0:
        for v in range(MAX_VALUE + 1):
            dp[0][v] = 1
    else:
        dp[0][arr[0] + 100] = 1

    for i in range(1, n):
        if arr[i] == 0:
            for v in range(MAX_VALUE + 1):
                if dp[i-1][v] > 0:
                    for new_val in [v-1, v, v+1]:
                        if 0 <= new_val <= MAX_VALUE:
                            dp[i][new_val] = (dp[i][new_val] + dp[i-1][v]) % MOD
        else:
            v = arr[i] + 100
            for prev_val in [v-1, v, v+1]:
                if 0 <= prev_val <= MAX_VALUE:
                    dp[i][v] = (dp[i][v] + dp[i-1][prev_val]) % MOD

    result = 0
    for v in range(MAX_VALUE + 1):
        result = (result + dp[n-1][v]) % MOD

    return result

Student Arrangement
Gameskraft โœ…
from collections import defaultdict, deque
def getMinRepairCost(g_nodes, g_from, g_to, g_weight, k):
    def can_reach_with_cost(max_cost):
        graph = defaultdict(list)
        for i in range(len(g_from)):
            if g_weight[i] <= max_cost:
                graph[g_from[i]].append(g_to[i])
                graph[g_to[i]].append(g_from[i])
        queue = deque([(1, 0)])
        visited = {1: 0}
       
        while queue:
            current, roads_used = queue.popleft()
            if current == g_nodes:
                return True
            if roads_used < k:
                for neighbor in graph[current]:
                    if neighbor not in visited or visited[neighbor] > roads_used + 1:
                        visited[neighbor] = roads_used + 1
                        queue.append((neighbor, roads_used + 1))
       
        return False
   
    left, right = min(g_weight), max(g_weight)
    result = -1
   
    while left <= right:
        mid = (left + right) // 2
        if can_reach_with_cost(mid):
            result = mid
            right = mid - 1
        else:
            left = mid + 1
   
    return result

Repairing Rods
Gameskraft โœ…
Company โ€“ Digantara
Role โ€“ Junior Data Scientist
Exp. โ€“ Fresher

Responsibilities โ€“
โ€ข Develop and implement statistics-based algorithms to enhance the accuracy and quality of space data
โ€ข Build and deploy machine learning models to classify space-based events and categorize them accordingly
โ€ข Create regression models to predict the trajectories and behaviours of space objects, considering various dynamic factors
โ€ข Develop robust evaluation frameworks to assess the performance of classification and regression models, continuously iterating on algorithms for enhanced accuracy and efficiency
โ€ข Collaborate with interdisciplinary teams to integrate machine learning solutions into our Space-MAPโ„ข๏ธ platform, ensuring seamless compatibility with existing systems

Skills โ€“
โ€ข Proficiency in basic descriptive statistics, hypothesis testing, feature transformation, dimensionality reduction, supervised or unsupervised learning, model tuning, and validation.
โ€ข Hands-on experience in developing machine learning models for classification and regression in a professional setting.
โ€ข Knowledge of data structures and various machine learning techniques. Familiarity with deep learning networks and other numerical algorithms.
Preferred :-
โ€ข Hands-on experience with Python packages for data analysis.
โ€ข Proficiency in programming languages such as Python, with experience in relevant libraries and frameworks.
โ€ข Experience with parallel programming and version control.

Apply Here โ€“ https://www.linkedin.com/jobs/view/3930503997
Hiring for Trained Freshers | No of Openings: 20  | CTC: 3.00 LPA
Send resumes to hr@lyrostech.com
Location: Hyderabad - WFO
Role: Software Engineer
Role: Permanent
YOP: 2022 to 2024 only
Mandatory to have Excellent Communication Skills
Strictly not Work from Home
What we're looking for:

- Trained fresher with a solid understanding of Apigee, GCP, or DevOps concepts.
- Enthusiastic individuals with a thirst for knowledge and a drive to excel.
- Strong communication and teamwork skills.