๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.59K photos
3 videos
95 files
10.2K 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
from bisect import bisect_left, bisect_right
def frogs(X, S, Y):
    Y.sort()
    results = []
    for x, s in zip(X, S):
        left_bound = x - s
        right_bound = x + s
        left_index = bisect_left(Y, left_bound)
        right_index = bisect_right(Y, right_bound)
        num_flies = right_index - left_index
        results.append(num_flies)
    return results
๐Ÿ“ŒHiring Alert ๐Ÿšจ
WNS is inviting applications for Inventory Management Role !!

Eligibility Criteria & Requirements:

- Qualifications: Bachelor's in Commerce /
   Master's in Commerce Only

0-2 Years of experience .
Candidate should be comfortable in working from office and night shift.
Candidate should be proficient in English communication.

Work location- Sec 30, Gurugram, Haryana

Interested candidates can share their Raj.kumar@wns.com

โ€œIMMEDIATE JOINERS PREFDEREDโ€

Please share details :

Total Experience:
Current CTC:
Notice Period:
Okay with Night shift :
Accenture Bulk Hiring .

Customer Support Associate - UK & US Clients.

Hiring 300 candidates for Accenture Bengaluru, Mumbai and Delhi NCR offices

Any Batch , Any degree is eligible

Package is 3.5-6.5 Lpa

Apply link :-
https://bit.ly/3yr52zo

Guys Donโ€™t miss the opportunity.
๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
    long long a, b;
    cin >> a;
    vector<long long> n(a);
    for (long long i = 0; i < a; ++i)
    cin >> n[i];
    cin >> b;
    vector<long long> r(b);
    for (long long i = 0; i < b; ++i)
        cin >> r[i];
    vector<long long> d(r.begin(), r.begin() + a);
    d.insert(d.end(), r.begin(), r.end());
    vector<long long> initial_diff;
    initial_diff.reserve(a);
    for (long long i = 0; i < a; ++i)
    initial_diff.push_back(abs(n[i] - d[i]));
    if (all_of(initial_diff.begin() + 1, initial_diff.end(), &
    {
        return x == initial_diff[0]; }))
    {
        cout << initial_diff[0] << endl;
    }
    else
    {
        for (long long i = 1; i < b; ++i) {
            vector<long long> window(d.begin() + i, d.begin() + i + a);
            vector<long long> diff;
            diff.reserve(a);
            transform(n.begin(), n.end(), window.begin(), back_inserter(diff), [](long long x, long long y)
            {
            return abs(x - y); });
            if (all_of(diff.begin() + 1, diff.end(), &
            {
                return x == diff[0]; }))
                {
                cout << diff[0] << endl;
                break;
            }
        }
    }
    return 0;
}

Morgan Stanley โœ…
#include <iostream>
#include <string>

using namespace std;

string getNextSequence(const string &s) {
    string result = "";
    int count = 1;
   
    for (size_t i = 1; i <= s.length(); ++i) {
        if (i < s.length() && s[i] == s[i - 1]) {
            ++count;
        } else {
            result += to_string(count) + s[i - 1];
            count = 1;
        }
    }
   
    return result;
}

string getNthPasscode(long long n) {
    if (n == 1) {
        return "1";
    }

    string result = "1";
    for (long long i = 2; i <= n; ++i) {
        result = getNextSequence(result);
    }
   
    return result;
}

int main() {
    long long smartCardNumber;
    cin >> smartCardNumber;
   
    string passcode = getNthPasscode(smartCardNumber);
    cout << passcode << endl;
   
    return 0;
}

Morgan Stanley โœ…
๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>

using namespace std;

long long findTeaserLevels(vector<long long>& levelValues, long long threshold) {
    sort(levelValues.begin(), levelValues.end());
    long long closestSum = LLONG_MIN;

    for (size_t i = 0; i < levelValues.size() - 2; ++i) {
        size_t left = i + 1;
        size_t right = levelValues.size() - 1;

        while (left < right) {
            long long currentSum = levelValues[i] + levelValues[left] + levelValues[right];

            if (currentSum <= threshold) {
                if (currentSum > closestSum) {
                    closestSum = currentSum;
                }
                ++left;
            } else {
                --right;
            }
        }
    }

    return closestSum == LLONG_MIN ? -1 : closestSum;
}

int main() {
    int levelValuesSize;
    cin >> levelValuesSize;

    vector<long long> levelValues(levelValuesSize);
    for (int i = 0; i < levelValuesSize; ++i) {
        cin >> levelValues[i];
    }

    long long thresholdValue;
    cin >> thresholdValue;

    long long result = findTeaserLevels(levelValues, thresholdValue);
    if (result == -1) {
        cout << "NA" << endl;
    } else {
        cout << result << endl;
    }

    return 0;
}

Morgan Stanley โœ…
Wipro is Inviting applications of (Analyst) for Gurgaon office.
Candidates with an experience range of 0 - 1 yr. Only, comfortable with US shifts, can send their CV's to ayaan.hossain@wipro.com with the below details.

Role- Analyst
Desired Candidate Profile:
Should be flexible working in Shifts.
Experience- 0 yrs. to 1 yrs.
Qualification- MBA/M.com/ B.com/BBA.
Location- Gurgaon (Work From Office Only)
Looking for Immediate Joiners
Genpact is hiring !

Skill set- P&C Insurance
Experience - 0-3 years (Freshers can Apply)
Location - Noida
Shift- APAC shift
Qualification - Any except technical

GOOD COMMUNICATION REQUIRED.

Note- Interested candidate can share their CV at rangoli.bhatt@genpact.com with the subject line "Application for Insurance "