๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
#include <vector>
#include <iostream>

using namespace std;

vector<int> solution(int riverWidth, int maxJump, vector<int> platformSizes) {
    int N = 1e5 + 5;
    int maxJumpTemp, totalPlatforms, currentPlatform, prefixSum[N], platformLength[N];
    vector<int> answer(riverWidth, 0); // Initialize answer with 0 and size riverWidth
   
    totalPlatforms = riverWidth;
    currentPlatform = platformSizes.size();
    maxJumpTemp = maxJump;
   
    for (int i = 1; i <= currentPlatform; i++) {
        prefixSum[i] = platformSizes[i - 1];
        platformLength[i] = prefixSum[i];
    }
   
    for (int i = 1; i <= currentPlatform; i++) {
        prefixSum[i] += prefixSum[i - 1];
    }
   
    int currentIndex = 1, gap = 1, maxReach = 0;
    for (int j = 1; j <= currentPlatform; ) {
        if (currentIndex - 1 + prefixSum[currentPlatform] - prefixSum[j - 1] == totalPlatforms) {
            int start = currentIndex;
            for (; currentIndex < platformLength[j] + start; currentIndex++)
                answer[currentIndex - 1] = j, maxReach = currentIndex;
            j++;
            gap = 1;
        } else if (gap < maxJumpTemp) {
            gap++;
            currentIndex++;
            continue;
        } else if (gap == maxJumpTemp) {
            int start = currentIndex;
            for (; currentIndex < platformLength[j] + start; currentIndex++)
                answer[currentIndex - 1] = j, maxReach = currentIndex;
            j++;
            gap = 1;
        }
    }
   
    if (totalPlatforms + 1 - maxReach > maxJumpTemp) {
        return {-1};
    }
   
    return answer;
}

int main() {
    int riverWidth = 7;
    int maxJump = 2;
    vector<int> platformSizes = {1, 2, 1};

    vector<int> result = solution(riverWidth, maxJump, platformSizes);
    for (int num : result) {
        cout << num << " ";
    }
    cout << endl;

    return 0;
}

River vala marioโœ…
Trilogy
Spinny Hiring

Interns for Project Engineering profile at our headquarters at Gurugram.

Internship duration: 3-4 months

โ˜…Perks Provided on completion:
๐Ÿ’กLetter Of Appreciation
๐Ÿ’กLetter Of Recommendation Stipend
๐Ÿ’กPPO (Based on the performance)

Points of necessary consideration:
- Must be 2023 pass out from Civil Engineering Courses.
- Must have experience with project management.
- Get on board with a team of extragavant professionals and have the necessary boost up to your career.

๐Ÿ’ปNOTE: Working Assets and Laptops will be provided.

Interested candidates can share their CV at the email address provided below: suryansh.tiwari@spinny.com

Civil Engineering students can apply
๐Ÿš€Aryson Technologies has launched multiple paid Internship program ๐Ÿš€

โณDuration: 6 months
๐Ÿ’ตStipend: Rs 5000
๐Ÿ“ Location: Sector 58, Noida

- Software Tester
- Web Designing
- Graphic Designing
- Technical Writer
- SEO

Share your updated resume to:
milanhrdept@arysontechnologies.com
Uniwave Software is Hiring for Fresher's

Job Role: Software Engineer


Qualification: BE/B.Tech - CS/IT

Passout: 2023-24 Only with 60% criteria(10th, 12th & Graduation)

Location: Pune
Package: 3.5-4.5 LPA
Skills: Java, Python, Dot Net, SQL, NodeJS


๐Ÿ‘‰Interested candidates can share cv at:
naresh@unijobsolution.com
TEKsystems is hiring freshers for Pune Location.

Skill : L1 Generalist - Support role
Shifts: Night shift( Cab facilities will be provided).
Experience 0-1year
Interview - F2F round (Post selection of 1st round.)

Skills required:
i) Excellent communication skills
ii) Good analytical knowledge

Work Location : Pune (Candidates from Pune or nearby places only)
Education Background: Graduate (Btech / BE / BCA
/B.Sc )

If any referrals needed please reach out to pbohara@teksystems.com
Entrust Walkin Interview | Hiring Trainee Software Engineer โค๏ธโค๏ธโค๏ธ

Detailed Eligibility:

Computer Science Graduates M.Sc / MCA / B.E / B.Tech (Computer Science)
2024 Passed outs Only
Experience: Freshers
Shift: General Shift (9 AM to 6 PM)

Walk In Procedure
Step 1: While coming for the Interview, please bring the interview call letter, Resume & Original Govt. ID Proof (No color xerox).
Step 2: Once you enter DLF Premises, you must register in the above link to enter the DLF Premises.

Apply from here (Direct Link): https://tinyurl.com/5xz9str3
๐Ÿ‘2
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
class UnionFind {
public:
    vector<int> parent, rank;
   
    UnionFind(int n) {
        parent.resize(n);
        rank.resize(n, 0);
        for (int i = 0; i < n; ++i) {
            parent[i] = i;
        }
    }

    int find(int x) {
        if (parent[x] != x) {
            parent[x] = find(parent[x]);
        }
        return parent[x];
    }

    void unite(int x, int y) {
        int rootX = find(x);
        int rootY = find(y);
        if (rootX != rootY) {
            if (rank[rootX] > rank[rootY]) {
                parent[rootY] = rootX;
            } else if (rank[rootX] < rank[rootY]) {
                parent[rootX] = rootY;
            } else {
                parent[rootY] = rootX;
                rank[rootX]++;
            }
        }
    }
};

    int minTimeToCollectPlates(vector<int>& x, vector<int>& y, int d) {
    int n = x.size();
    UnionFind uf(n);
   
   
    unordered_map<int, vector<int>> xMap, yMap;
   
    for (int i = 0; i < n; ++i) {
        xMap[x[i]].push_back(i);
        yMap[y[i]].push_back(i);
    }


    for (const auto& [coord, indices] : xMap) {
        for (int i = 1; i < indices.size(); ++i) {
            if (abs(y[indices[i]] - y[indices[i - 1]]) <= d) {
                uf.unite(indices[i], indices[i - 1]);
            }
        }
    }


    for (const auto& [coord, indices] : yMap) {
        for (int i = 1; i < indices.size(); ++i) {
            if (abs(x[indices[i]] - x[indices[i - 1]]) <= d) {
                uf.unite(indices[i], indices[i - 1]);
            }
        }
    }

   
    unordered_set<int> unique;
    for (int i = 0; i < n; ++i) {
        unique.insert(uf.find(i));
    }

    return unique.size();
}

Gamekraft โœ