๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.54K subscribers
5.57K photos
3 videos
95 files
9.81K 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 <bits/stdc++.h>
using ll = long long ;
using namespace std;
ll calculateResult(vector<ll>& arr, ll n, ll k) {
    set<int> st;
    ll ans = 0;
    ll sum = 0;
    sort(arr.begin(), arr.end(), greater<int>());
    for (ll i = 0; i < n; i++) {
        if (st.find(arr[i]) != st.end()) {
            continue;
        }
        if (arr[i] - sum > 0) {
            sum += k; 
            ans++;   
            st.insert(arr[i]); 
        }
    }
    return ans;
}


Go Daddy โœ…
๐Ÿ‘2
#include <iostream>
#include <vector>
using namespace std;
vector<int> solve(const vector<int>& arr) {
    int n = arr.size();
    vector<int> result;
        for (int i = 0; i < n - 2; i++) {
        int a = arr[i];
        int b = arr[i + 1];
        int c = arr[i + 2];
                if (a + b > c && a + c > b && b + c > a) {
            result.push_back(1);
        } else {
            result.push_back(0);
        }
    }
   
    return result;
}


Motive (SWE) โœ…
#include <iostream>
#include <vector>
int solve(vector<int>& visits, int target) {
    int n = visits.size();
    for (int i = 0; i < n; ++i) {
        int sum = 0;
        for (int j = 0; j <= i; ++j) {
            sum += visits[j];
        }
        if (sum >= target) {
            return i;
        }
    }
   
    return -1;
}

Databricks โœ…
๐Ÿคฎ1
#include <bits/stdc++.h>
using ll = long long ;
using namespace std;
bool isPalindrome(int number) {
    string str =to_string(number);
    int left = 0, right = str.size() - 1;
    while (left < right) {
        if (str[left] != str[right]) {
            return false;
        }
        left++;
        right--;
    }
    return true;
}
vector<int> findPalindromicTransactions(vector<int>& transactions) {
    std::vector<int> palindromicIDs;
    for (int transaction : transactions) {
        if (isPalindrome(transaction)) {
            palindromicIDs.push_back(transaction);
        }
    }

    sort(palindromicIDs.begin(), palindromicIDs.end(),greater<int>());

    return palindromicIDs;
}


Databricks โœ…
๐Ÿ˜ข1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

long maximize(int x_rows, int x_columns, vector<vector<int>>& x) {
    vector<vector<long>> prefixSum(x_rows + 1, vector<long>(x_columns + 1, 0));
    for (int i = 1; i <= x_rows; ++i) {
        for (int j = 1; j <= x_columns; ++j) {
            prefixSum[i][j] = x[i-1][j-1] +
                               prefixSum[i-1][j] +
                               prefixSum[i][j-1] -
                               prefixSum[i-1][j-1];
        }
    }

    long maxF = 0;

    for (int h = 1; h < x_rows; ++h) {
        for (int v = 1; v < x_columns; ++v) {
            long sumA = prefixSum[h][v];
            long sumB = prefixSum[h][x_columns] - prefixSum[h][v];
            long sumC = prefixSum[x_rows][v] - prefixSum[h][v];
            long sumD = prefixSum[x_rows][x_columns] - prefixSum[h][x_columns] - prefixSum[x_rows][v] + prefixSum[h][v]; // Bottom-right
            long fX = abs(sumA) + abs(sumB) + abs(sumC) + abs(sumD);
            maxF = max(maxF, fX);
        }
    }

    return maxF;
}
Blinkit Analyst Intern

Looking for a talented individual to join as an Analyst Intern in the Central Ops strategy team at Blinkit in Gurgaon.

Key Skills:

- Proficiency in Basic SQL and Excel (including Dashboarding and VBA).

Strong problem-solving abilities and logical thinking.

- Final-year students or fresh graduates preferred, but open to others.

Additional information:

- Internship Duration: 3 months

- PPO based on performance

Join us ASAP (preferably within 7-15 days) by filling out the form below. Applications

open till 27th Oct'24.


https://docs.google.com/forms/d/e/1FAIpQLSe604ZBbM5HqQmuPo7vHT4guszf0TNsakzILpE3ZMHhOH6iTQ/viewform
def ss(firstnum: str, secondnum: str, thirdnum: str) -> bool:
    target_sum = int(thirdnum)
    second_value = int(secondnum)
    if int(firstnum) + second_value == target_sum:
        return True
    for i in range(len(firstnum)):
        new_firstnum = firstnum[:i] + firstnum[i+1:]
        if new_firstnum and (new_firstnum[0] != '0'):
            if int(new_firstnum) + second_value == target_sum:
                return True
    return False
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int T;
    cin >> T;
    for(int test_case=1; test_case<=T; test_case++){
        int N;
        cin >> N;
        string S = "";
        cin>>S;
   
        vector<int> pre(2*N +1, 0);
        for(int i=1; i<=2*N; i++){
            if(S[i-1] == 'R'){
                pre[i] = pre[i-1] +1;
            }
            else{
                pre[i] = pre[i-1] -1;
            }
        }

        unordered_map<int, int> dp1,dp2;
        for(int i=0; i<=2*N; i++){
            int d = pre[i];
            if(i <= N){
                if(dp1.find(d) == dp1.end()){
                    dp1[d] = i;
                }
            }
            if(i >= N){
                if(dp2.find(d) == dp2.end() || i > dp2[d]){
                    dp2[d] = i;
                }
            }
        }

        int mx =0;
        for(auto &entry : dp1){
            int d = entry.first;
            if(dp2.find(d) != dp2.end()){
                int last = dp2[d] - entry.second;
                if(last > mx){
                    mx = last;
                }
            }
        }
        int ans = 2 * N - mx;
        cout << "#" << test_case << " " << ans << "\n";
    }
}

Samsung (R&D)โœ…
#include<iostream>
using namespace std;
int solve(vector<int>ribbons, int k)
{
    int low=0, high=*max_element(ribbons.begin(), ribbons.end());
    while(low<high)
    {      
        int mid=(low+high+1)>>1;
        int cnt=0;
        for(int r:ribbons)
            cnt+=r/mid;
           
        if(cnt<k)
            high=mid-1;
        else
            low=mid;
    }
    return low;
}