๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
vector<int> ttl_cache(int n, vector<vector<int>> entries, vector<int> queries){
    int q = queries.size();

    vector<pair<int,int>> arr;
    for(int i=0;i<q;i++){
        arr.push_back({queries[i],i});
    }
    sort(arr.begin(),arr.end());

    vector<int> res(q);
    pbds st;

    int i=0;
    int x = arr[i].first;
    sort(entries.begin(), entries.end());
    for(auto &v:entries){
        while(v[0]>x){
            res[arr[i].second] = st.size() - st.order_of_key(x);
            i++;
            if(i==q) return res;
            x = arr[i].first;
        }
        st.insert(v[0]+v[1]);
    }

    for(;i<q;i++){
        x = arr[i].first;
        res[arr[i].second] = st.size() - st.order_of_key(x);
    }
    return res;
}


TTL Cache โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
int countBits(int v) { 
    int count = 0;
    while (v > 0) {
        count += v & 1;
        v >>= 1;
    }
    return count;
}

string palindromeChecker(string s, vector<int> startIndex, vector<int> endIndex, vector<int> subs) {
    int bp = 0;
    string myString = "";
    vector<int> L;
    L.push_back(bp);

    for (char i : s) {
        int ci = i - 'a';
        bp = bp ^ (1 << ci);
        L.push_back(bp);
    }

    int q = startIndex.size();
    int c1 = L[startIndex[0]];
    int c2 = L[endIndex[0] + 1];
    int di = c1 ^ c2;
    int ooc = countBits(di);
    bool r = (ooc - subs[0] * 2) <= 1;

    if (r) {
        myString = "1";
    } else {
        myString = "0";
    }

    return myString;
}


Can you make a palindrome
BNY Mellon โœ…
โค1๐Ÿคฉ1
def count_subsequences(s1, s2):
    m, n = len(s1), len(s2)
    dp = [[0] * (n + 1) for _ in range(m + 1)]

    for j in range(n + 1):
        dp[0][j] = 1

    for i in range(1, m + 1):
        for j in range(1, n + 1):
            if s1[i - 1] == s2[j - 1]:
                dp[i][j] = dp[i][j - 1] + dp[i - 1][j - 1]
            else:
                dp[i][j] = dp[i][j - 1]

    return dp[m][n]

Source : Hola โœ…
Tech Mahindra is hiring for SERVICE DESK AGENTS

Job Location : Noida (nsez)

-- Should have good and working knowledge on windows/mac os, AD, multifactor authentication, access request of applications.
-- Experience on ITSM TOOLS, remote tools and troubleshooting.
-- Understanding of priority and escalation matrix.
--
Troubleshooting on Application support, printers, mfd's, von software,
collaboration tools, password reset tools, ms windows & office,
desktops, laptops, ipad peripherals & networking etc
-- aware of kpi's and sla's

5 days working
both side cab facility (under 30km of radius from ofc campus)

FRESHERS WITH GOOD COMMUNICATION SKILLS & BASIC TECHNICAL KNOWLEDGE CAN ALSO APPLY.

GRADUATION IS MANDATORY.

ONLY IMMEDIATE JOINERS CAN APPLY.

Call or share your resume @ 8527249359 / ns00834085@techmahindra.com
Exciting Internship Opportunity!๐Ÿ””

The Man Company is hiring a Data Analyst Intern!

We are looking for a Data Analyst Intern to join our Operations team. If you have a passion for supply chain management and data analysis, this is the perfect opportunity for you!

๐Ÿ“ Location: Gurgaon (Work from office)

Send CVs at aayushi@themancompany.com
๐Ÿ‘1
๐Ÿš€ Join Our FinTech Team : Founding Mobile Developer

Location: Gurugram
Type: Full-time position at Gurugram Office
Experience: 0-2 yrs of Experience (Freshers/Recent Graduates can also apply) (Flutter Experience Preferred but any mobile development experience will be good enough)
Qualifications: B.Tech CSE Preferred but if you have worked in FinTech earlier, that would be a bigger plus. (Btw Open to all)
Perks: Competitive compensation and ESOPs ; and an exposure to Trading & FinTech Industry like never before.

Apply Here : https://forms.gle/cW1KK2n4hsqzRvdS7
int mincost(vector<int> &pods,vector<int> &cost){
  map<int,multiset<int>> mp;
  for(int i=0;i<pods.size();i++){
    mp[pods[i]].insert(cost[i]);
  }
  int ans = 0;
  int curr = (*mp.begin()).first,sm = 0;
  multiset<int> se;
  while(1){
    if(se.size()==0){
      if(mp.lower_bound(curr) == mp.end()) break;
      curr = (*mp.lower_bound(curr)).first;
    }

    if(mp.find(curr) != mp.end())
    for(auto &x:mp[curr]){
        se.insert(x);
        sm += x;
    }

    auto it = se.end();
    it--;
    sm -= *it;
    ans += sm;
    se.erase(it);
    curr++;
  }

  return ans;
}

Weird Pod Count โœ…
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

bool canCoverAllHouses(const vector<int>& houses, int N, int K, int P) {
    int count = 0;
    int i = 0;
    while (i < N && count < K) {
        int location = houses[i] + P;
        count++;
        while (i < N && houses[i] <= location + P) {
            i++;
        }
    }
    return i == N;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
   
    int N, K;
    cin >> N >> K;
   
    vector<int> houses(N);
    for (int i = 0; i < N; ++i) {
        cin >> houses[i];
    }
   
    sort(houses.begin(), houses.end());
   
    int left = 0;
    int right = houses[N-1] - houses[0];
    int result = right;
   
    while (left <= right) {
        int mid = left + (right - left) / 2;
        if (canCoverAllHouses(houses, N, K, mid)) {
            result = mid;
            right = mid - 1;
        } else {
            left = mid + 1;
        }
    }
   
    cout << result << '\n';
   
    return 0;
}
๐Ÿ‘1