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

1)First introduction
2)Then she asked about course like i have done cisco ccna course that
3)Then about web dev internship
4)College Project Explain
5)About python
6)Why python
7)She gave a task like CAT BAT PAT DAT
output should be like

["CA", "BA", "PA", "DA"]
8)Then 2 questions about dependency
9)Global and local variables
10)The she gave me 2 strings and asked me how to print them in one line
11)Without using concat
12)OOPS
13)Different between python and java
14)Reverse of a number
15)Swapping
16)Why reactjs
17)API
18)Backend coding
19)If u are from ECE then they will ask logic of code
Any Questions
๐Ÿ‘2
long long solve(int N,int M,vector<int>Arr){
    vector<int>v(N+1,INT_MAX);
    int n=N;
    for(int i=n-1;i>=0;i--){
        v[i]=min(v[i+1],Arr[i]);
    }
    long long ans=INT_MAX;
    for(int i=0;i<N;i++){
        if((i+M-1)<N){
            ans=min(ans,1ll*Arr[i]*v[i+M-1]);
        }
    }
    return ans;
}

Array transfer
Uber โœ…
๐Ÿ‘1
void dfs(int curr, int p, vector<int>* e, vector<int>& v, vector<int>& par, vector<int>& A){
    par[curr] = p;
    v[curr] = A[curr - 1];
    for(auto it : e[curr]){
        if(it == p) continue;
        dfs(it, curr, e, v, par, A);
        v[curr] += v[it];
    }
}
int solve(int N, vector<vector<int>> edges, vector<int> A){
    vector<int> e[N+1];
    map<vector<int>, int> mp;
    int c = 0;
    for(auto it : edges){
        e[it[0]].push_back(it[1]);
        e[it[1]].push_back(it[0]);
        mp[{it[0], it[1]}] = mp[{it[1], it[0]}] = c;
        c++;
    }
    int sum = 0;
    for(auto it : A) sum += it;
    vector<int> v(N+1, 0), par(N+1, 0);
    dfs(1, 0, e, v, par, A);
    int ans = sum;
    int id = edges.size();

    for(int i = 1; i <= N; i++){
        int a = sum - v[i];
        if(abs(a - v[i]) < ans){
            ans = abs(a - v[i]);
            id = mp[{par[i], i}] + 1;
        }
        else if(abs(a - v[i]) == ans){
            id = min(id, mp[{par[i], i}] + 1);
        }
    }
    return id;
}

Division Nodes โœ…
Uber
typedef long long ll;

void solve() {

  ll n = N;
  vector<vector<ll>>arr(n, vector<ll>(3));
  for (int i = 0; i < n; i++) {
    arr[i] = {[0] = people[i] , [1] = starting[i] , [2] = ending[i]};
  }
  sort(arr.begin() , arr.end() , [&](vector<ll>& a , vector<ll>& b) {
    if (a[1] == b[1]) return a[2] < b[2];
    return a[1] < b[1];
  });

  ll sum = 0;
  for (auto& x : arr) sum += x[0];

  vector<ll>dp(n, -1);
  auto recurr = [&](ll i , auto && recurr)->ll{
    if (i >= n) return 0;

    ll& ans = dp[i];
    if (ans != -1) return ans; ans = 0;

    ans = recurr(i + 1 , recurr);
    ll low = i , high = n , val = arr[i][2];
    while (high - low > 1) {
      ll mid = (low + high) >> 1;
      if (val >=  arr[mid][1]) low = mid;
      else high = mid;
    }

    ans = max(ans, arr[i][0] + recurr( low + 1 , recurr) );

    return ans;
  };



  return sum - recurr(0, recurr);

}

Meeting Room โœ…
Uber