๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.56K photos
3 videos
95 files
9.7K 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
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    vector<pair<int,int>>points(n);
    for(int i=0;i<n;i++){
        cin>>points[i].first>>points[i].second;
    }
    int k;
    cin>>k;
    vector<pair<double,int>>store;
    for(int i=0;i<n;i++){
        double dist=pow((pow(points[i].first,2)+pow(points[i].second,2)),0.5);
        store.push_back({dist,i});
    }
    sort(store.begin(),store.end());
    for(int i=0;i<k;i++){
        int index=store[i].second;
        cout<<points[index].first<<" "<<points[index].second<<endl;
    }
    return 0;
}

At Center โœ…
Walmart
#include <bits/stdc++.h> 
using namespace std; 
#define int long long 
 
int n; 
int t[21][10003]; 
 
int solve(vector<int>& rods, int i, int diff) { 
    if (i == n) { 
        if (diff == 0) 
            return 0; 
 
        return LLONG_MIN;   
    } 
 
    if (t[i][diff + 5000] != -1) 
        return t[i][diff + 5000]; 
 
    int ans = 0; 
 
    int nothing = solve(rods, i + 1, diff); 
    int in_rod_1 = rods[i] + solve(rods, i + 1, diff + rods[i]); 
    int not_in_rod1 = rods[i] + solve(rods, i + 1, diff - rods[i]); 
 
    return t[i][diff + 5000] = max({nothing, in_rod_1, not_in_rod1}); 

 
int check(vector<int>& rods) { 
    n = rods.size(); 
 
    memset(t, -1, sizeof(t)); 
 
    return solve(rods, 0, 0) / 2; 

 
signed main() { 
    int n; 
    cin >> n; 
    vector<int> rods(n); 
    for (int i = 0; i < n; ++i) 
        cin >> rods[i]; 
    cout << check(rods); 
 
    return 0; 
}

Maximum power โœ…
def max_difference(arr):
    n = len(arr)
    next_greater = [-1] * n
    stack = []

    for i in range(n):
        while stack and arr[i] > arr[stack[-1]]:
            next_greater[stack.pop()] = i

        stack.append(i)

    max_diff = float('-inf')

    for i in range(n):
        if next_greater[i] != -1:
            max_diff = max(max_diff, abs(arr[next_greater[i]] - arr[i]))

    return max_diff

Calculate Difference โœ…
def is_prime(num):
    if num < 2:
        return False
    for i in range(2, int(num**0.5) + 1):
        if num % i == 0:
            return False
    return True

def max_distance_between_primes(arr):
    primes = [i for i in arr if is_prime(i)]

    if len(primes) < 2:
        return -1

    max_distance = 0
    for i in range(1, len(primes)):
        distance = primes[i] - primes[i - 1]
        max_distance = max(max_distance, distance)

    return max_distance

Maximum prime difference โœ…
#include<bits/stdc++.h>
using namespace std;

string solve(int x1, int y1, int r1, int x2, int y2, int r2) {
    int distSq = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
    int radSumSq = (r1 + r2) * (r1 + r2);
    if (distSq == radSumSq)
        return "Touching";
    else if (distSq == 0) {
        if (r1 == r2)
            return "Concentric";
        else
            return "Disjoint-Inside";
    }
    else if (distSq > radSumSq)
        return "Disjoint-Outside";
    else
        return "Intersecting";
}

vector<string> circles(vector<string> circlePairs) {
    vector<string> result;
    for (const string& pair : circlePairs) {
        stringstream ss(pair);
        int x1, y1, r1, x2, y2, r2;
        ss >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
        result.push_back(solve(x1, y1, r1, x2, y2, r2));
    }
    return result;
}

IBM โœ…
role of "Data Engineer".

Skills: Data Engineering, SQL, Python, Spark, Kafka, Big Data / Cloud DWH
Work mode: Bangalore โ€“ Hybrid / Other locations โ€“ Remote
Interview Rounds: 2 (G-Meet)
Notice Period: Immediate to max 10 days.

If interested, please share your CV to the below email id.

Email: Madhumita.jadhav@nuvento.com
Genpact is hiring for Talent Acquistion - Sourcing Specialist (NON-IT)

Current Location- NCR
Notice Period - Immediate to 15 days
RTO Mandate

Interested candidates can share their resume at mizba.mohammedshaikh@genpact.com with subject line "Application for Talent acquisition role"
Nuvento Inc is hiring for Data Engineer!!

Skills: Data Engineering, SQL, Python, Spark, Kafka, BigData / Cloud DWH

Work mode: Remote
Notice Period: Immediate to max 10 days.

If interested, please share your CV to umaparameshwari@nuvento.com
Company Name: Mercari, Inc.

Program: Build at Mercari 2024, Software Engineer (Training) Get Trained for 2 weeks and then invitation for interviews for an internship

Role: Build Intern (1 Month) Summer Intern (2 months)

Batch eligible: 2027, 2026, 2025, 2024, 2023, 2022 and 2021 passouts

Location: Remote Expected

Stipend: INR 50K per month or more Application

deadline: January 15, 2024

https://apply.workable.com/mercari/j/2D079007DB/