๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
int solve(int input1, int input2[]) { 
    int n = input1;
    vector<int>v(n);
    for (int i = 0; i < n; ++i)
    {
        v[i] = input2[i];
    }
    sort(v.begin(), v.end(), greater<int>());
    vector<long long>suf(n);
    for (int i = n - 1; i >= 0; --i)
    {
        if (i == n - 1)suf[i] = v[i];
        else suf[i] += suf[i + 1] + v[i];
    }
    long long res = LLONG_MIN;
    long long sm = 0;
    for (int i = 0; i < n; ++i)
    {
        long long temp = (sm * (i)) + suf[i];
        res = max(res, temp);
        sm += v[i];
    }
    res = max(res, sm * n);
    return res;
}
Magical gems โœ…
Sigmoid
โค1
VMware Summer Internship 2025 ๐Ÿš€
Attention TPOs and Placement Officers! Share this exciting opportunity with your students and alumni!Work with VMware and dive into virtualization technologies!Key Details:
Company: VMware
Role: Software Engineering Intern
Stipend: INR 1,25,000/- per month
Internship Timeline: June - August 2025
Apply By: October 30, 2024
๐Ÿ”— Apply Here: [VMware Summer Internship](https://lnkd.in/gfcM3JmF)
VMware Summer InternshipThis internship is a fantastic opportunity for students to gain hands-on experience in a leading technology company, working on cutting-edge projects and technologies.
๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <queue>
#include <tuple>

using namespace std;

int rescueKingGeorge(int input1, int input2, vector<vector<int>>& palace) {
    pair<int, int> entrance, prison;
    for (int i = 0; i < input1; i++) {
        for (int j = 0; j < input2; j++) {
            if (palace[i][j] == 1) entrance = {i, j};
            if (palace[i][j] == 2) prison = {i, j};
        }
    }
    vector<pair<int, int>> directions = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};

    queue<tuple<int, int, int>> q;
    q.push({entrance.first, entrance.second, 1});
    vector<vector<bool>> visited(input1, vector<bool>(input2, false));
    visited[entrance.first][entrance.second] = true;
    while (!q.empty()) {
        auto [row, col, dist] = q.front();
        q.pop();
        if (row == prison.first && col == prison.second) {
            return dist;
        }
        for (auto [dr, dc] : directions) {
            int newRow = row + dr;
            int newCol = col + dc;
            if (newRow >= 0 && newRow < input1 && newCol >= 0 && newCol < input2 &&
                !visited[newRow][newCol] && palace[newRow][newCol] != -1) {
                visited[newRow][newCol] = true;
                q.push({newRow, newCol, dist + 1});
            }
        }
    }
    return -1;
}


King georges
Sigmoid โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool solve(int power, const vector<int>& benches, const vector<int>& lampPosts) {
    int n = benches.size();
    int m = lampPosts.size();
    int j = 0; 
   
    for (int i = 0; i < n; ++i) {
        while (j < m && lampPosts[j] + power < benches[i]) {
            ++j;
        }
        if (j >= m || lampPosts[j] - power > benches[i]) {
            return false;
        }
    }
    return true;
}

int findMinPower(int numBenches, int numLampPosts, vector<int>& benches, vector<int>& lampPosts) {
    sort(benches.begin(), benches.end());
    sort(lampPosts.begin(), lampPosts.end());

    int low = 0;
    int high = max(benches.back(), lampPosts.back()); 
    while (low < high) {
        int mid = (low + high) / 2;
        if (solve(mid, benches, lampPosts)) {
            high = mid;
        } else {
            low = mid + 1; 
        }
    }

    return low;
}


illuminate the park
Sigmoidโœ…
long getMaximumEfficiency(vector<int> capacity, vector<int> numServers) {
    int n = capacity.size();
    int k = numServers.size();

    sort(capacity.begin(), capacity.end());
   
    sort(numServers.rbegin(), numServers.rend());
   
    long maxEfficiency = 0;
    int left = 0; 
    int right = n - 1;
   
    for (int i = 0; i < k; i++) {
        int batchSize = numServers[i];
        int minCapacity = capacity[left];
        int maxCapacity = capacity[right];
       
        maxEfficiency += maxCapacity - minCapacity;
       
        left += batchSize - 1; 
        right--;
    }
   
    return maxEfficiency;
}

DELL (Intern) โœ…
function findMostEngagingPost(posts) {
    let maxScore = -1;
    let mostEngagingPostId = '';

    posts.forEach(post => {
        let score = post.likes * 2 + post.shares * 3 + post.comments;
        if (score > maxScore || (score === maxScore && !mostEngagingPostId)) {
            maxScore = score;
            mostEngagingPostId = post.id;
        }
    });

    return mostEngagingPostId;
}

DELL (Intern) โœ…
Social Media Post Analyzer
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int findKthHighestDiamonds(string houses, int M, int K) {
    vector<int> diamondCounts;
    int n = houses.size();
        if (M > n) {
        return -1;
    }
    int currentDiamonds = 0;
        for (int i = 0; i < M; ++i) {
        if (houses[i] == '1') {
            currentDiamonds++;
        }
    }
        diamondCounts.push_back(currentDiamonds);
        for (int i = M; i < n; ++i) {
        if (houses[i - M] == '1') {
            currentDiamonds--;
        }
        if (houses[i] == '1') {
            currentDiamonds++;
        }
        diamondCounts.push_back(currentDiamonds);
    }
        sort(diamondCounts.begin(), diamondCounts.end(), greater<int>());
        if (K > diamondCounts.size()) {
        return -1;
    }
        return diamondCounts[K - 1];
}


Dimaond Thief
Sigmoid โœ…
๐Ÿ‘1
#include <iostream>
#include <string>

using namespace std;

char lastOneStanding(string S, int K) {
    string concatenatedString = "";
    for (int i = 0; i < K; i++) {
        concatenatedString += S;
    }
        int removeFromStart = 1;
   
    while (concatenatedString.length() > 1) {
        string newString = "";
        int len = concatenatedString.length();
       
        if (removeFromStart) {
            for (int i = 1; i < len; i += 2) {
                newString += concatenatedString[i];
            }
        } else {
            for (int i = len - 2; i >= 0; i -= 2) {
                newString = concatenatedString[i] + newString;
            }
        }
       
        concatenatedString = newString;
        removeFromStart = 1 - removeFromStart;
    }
   
    return concatenatedString[0];
}


Last one standingโœ…
List<Integer> findNumberSequence(String direction) {
        int n = direction.length();
        List<Integer> ans = Arrays.asList(new Integer[n]);
        int l = 0, r = n - 1;

        for (int i = 0; i < n; i++) {
            if (direction.charAt(i) == 'R') {
                ans.set(l, i + 1);
                l++;
            } else {
                ans.set(r, i + 1);
                r--;
            }
        }
        return ans;
    }

UKGโœ…
Exotel Hiring Software Engineer 1

Bachelor's or Master's degree in computer science or equivalent.

Experience:6 months -1 year
Good knowledge of one of the OOP languages: Golang (preferred) / PHP (preferred)/Java / Ruby / Python / C++

Good understanding of data structures, multi-threading and concurrency concepts.

Strong analytical and problem-solving skills.

Excellent written and verbal communication skills.

Team player, flexible and able to work in a fast-paced environment.

A "DevOps" mindset. You own what you will develop.




Good to Haves
Familiarity with 3-Tier, microservices architecture

Familiarity of RESTful services

Familiarity with developing Linux-based applications, networking and scripting

Familiarity with different data stores, data modelling, SQL & NoSQL databases

Familiarity with elastic search queries and visualization tools like grafana, kibana

Familiarity with networking fundamentals: Firewalls, Proxies, DNS, Load Balancing, etc.



Hiring Process:


1. Online Test

Comprising of four sections: Abstract Reasoning, Numeric Reasoning, Verbal Reasoning, and Hands-on Programming.

2. Tech Interview: Tech Round comprising of Data Structures & Algorithms

3. Hiring Manager Interview

4. HR Interview

https://exotel.com/careers/#op-638137-software-engineer1immediate-joiners-only
๐Ÿ‘3
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <unordered_map>
#include <string>
using namespace std;

void find_most_frequent_ngram(const string& S, int N) {
    unordered_map<string, int> a;
    int w = 0;
    string d;

    for (int i = 0; i <= S.length() - N; ++i) {
        string ngram = S.substr(i, N);
        a[ngram]++;
        if (a[ngram] > w) {
            w = a[ngram];
            d = ngram;
        }
    }
        cout << d << " " << w << endl;
}

int main() {
    string input, S;
    int N;
    getline(cin, input);
    size_t space_pos = input.find_last_of(' ');
    S = input.substr(0, space_pos);
    N = stoi(input.substr(space_pos + 1));
    find_most_frequent_ngram(S, N);
   
    return 0;
}
๐Ÿ‘1๐Ÿ”ฅ1