๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.62K 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
Do you enjoy reading this channel?

Perhaps you have thought about placing ads on it?

To do this, follow three simple steps:

1) Sign up: https://telega.io/c/cs_algo
2) Top up the balance in a convenient way
3) Create an advertising post

If the topic of your post fits our channel, we will publish it with pleasure.
๐Ÿ‘1
Amazon On campus - Data Engineering Interview experience

1. Introduction
2. Projects
3. Types of data
4. Data warehouse and lake
5. In context with Amazon redshift
6. Snowflake and star schema
7. Simple join and sub query based sql question on livecoding platform
8. Simple count no. Of each letter in a string in python on livecoding
๐Ÿ‘2
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define vll vector<long long>

void solve(vll adj[], ll n) {
    bool vis[n + 1];
    memset(vis, 0, sizeof vis);
    priority_queue<ll, vll, greater<ll>> Q;
    vis[1] = true;
    Q.push(1);
    while (!Q.empty()) {
        ll now = Q.top();
        Q.pop();
        cout << now << " ";
        for (auto p : adj[now]) {
            if (!vis[p]) {
                Q.push(p);
                vis[p] = true;
            }
        }
    }
}

int main() {
    ll n = 3, m = 2;
    vll adj[n + 1];
    vll a = {1, 1};
    vll b = {2, 3};
    for (ll i = 0; i < m; i++) {
        adj[a[i]].push_back(b[i]);
        adj[b[i]].push_back(a[i]);
    }
    solve(adj, n);
    return 0;
}

Forest traversal โœ…
int calculateTotalWeight(vector<int>& weights) {
    int totalWeight = 0;
    while (!weights.empty()) {
        auto minElementIter = min_element(weights.begin(), weights.end());
        totalWeight += *minElementIter;
        int index = distance(weights.begin(), minElementIter);
        int start = max(0, index - 1);
        int end = min(index + 1, static_cast<int>(weights.size()) - 1);
        weights.erase(weights.begin() + start, weights.begin() + end + 1);
    }
    return totalWeight;
}

IBM โœ…
Total Weight