๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.62K subscribers
5.6K photos
3 videos
95 files
10.4K 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
def updatePrefixSum(prefixSum, x1, y1, x2, y2, h):
    prefixSum[y1][x1] += h
    if x2 + 1 < len(prefixSum[0]):
        prefixSum[y1][x2 + 1] -= h
    if y2 + 1 < len(prefixSum):
        prefixSum[y2 + 1][x1] -= h
    if x2 + 1 < len(prefixSum[0]) and y2 + 1 < len(prefixSum):
        prefixSum[y2 + 1][x2 + 1] += h

def calculateTotalWater(prefixSum, x1, y1, x2, y2):
    total = 0
    for i in range(y1, y2 + 1):
        for j in range(x1, x2 + 1):
            if i > 0:
                prefixSum[i][j] += prefixSum[i - 1][j]
            if j > 0:
                prefixSum[i][j] += prefixSum[i][j - 1]
            if i > 0 and j > 0:
                prefixSum[i][j] -= prefixSum[i - 1][j - 1]
            total += prefixSum[i][j]
    return total

def rainInRectangle():
    n, m, k, q = map(int, input().split())
    prefixSum = [[0] * (n + 1) for _ in range(m + 1)]

    for _ in range(k):
        x1, y1, x2, y2, h = map(int, input().split())
        updatePrefixSum(prefixSum, x1 - 1, y1 - 1, x2 - 1, y2 - 1, h)

    results = []
    for _ in range(q):
        x1, y1, x2, y2 = map(int, input().split())
        result = calculateTotalWater(prefixSum, x1 - 1, y1 - 1, x2 - 1, y2 - 1)
        results.append(result)

    return results


Phonepe โœ…
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;
bool cmp(const string& s, const string& t) {
    if (s.size() == t.size()) {
        return s < t;
    }
    return s.size() < t.size();
}
void SolvePuzzle(int n, vector<string>& str) {
    vector<string> ans;
    for (int i = 0; i < n; i++) {
        string s = str[i];
        int j = 0;
        while (j < s.size()) {
            string temp;
            while (j < s.size() && s[j] >= '0' && s[j] <= '9') {
                temp += s[j];
                j++;
            }
            if (!temp.empty()) {
                string frzi = "";
                string rest = "0";
                bool xx = false;
                for (int k = 0; k < temp.size(); k++) {
                    if (temp[k] == '0' && !xx) {
                        continue;
                    } else {
                        frzi += temp[k];
                        xx = true;
                    }
                }
                if (!xx) {
                    ans.push_back(rest);
                } else {
                    ans.push_back(frzi);
                }
            }
            j++;
        }
    }
    sort(ans.begin(), ans.end(), cmp);
    for (const auto& str : ans) {
        cout << str << endl;
    }
}

int main() {
    int n;
    cin >> n;
    vector<string> str(n);
    for (int i = 0; i < n; ++i) {
        cin >> str[i];
    }
    SolvePuzzle(n, str);
   
    return 0;
}

Amelia โœ…
Tesco
def solution(laps):
    drivers = {}
    eliminated = []

    for lap in laps:
        slowest = float('-inf')
        toRemove = []

        for info in lap:
            name, time = info.split()
            time = int(time)
           
            drivers[name] = min(drivers.get(name, time), time)
           
            if drivers[name] > slowest:
                slowest = drivers[name]
                toRemove = [name]
            elif drivers[name] == slowest:
                toRemove.append(name)
       
        eliminated.extend(sorted(toRemove))
        for name in toRemove:
            del drivers[name]

    return eliminated


Databrick โœ…
https://www.linkedin.com/jobs/view/4025861173

Voya India Hiring Trainee

1. Responsible to process participants/Plan level transactions

2. Will have to work closely with supervisors to ensure all transactions are processed accurately

3. Strict adherence non-disclosure of client information by preserving client confidentiality

4. Completing assigned responsibilities within the defined SLAs

Skills & Required profile

1. Should be a Graduate and not an Engineering/MCA graduate

2. Should have good communication and analytical skills

3. Should be a self-starter, proactive and target oriented

4. Good knowledge of MS Office applications

5. Should be flexible to work in night shifts and must extend when business required Employment type: Full time
๐Ÿ‘1