๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.56K photos
3 videos
95 files
9.68K 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 <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int min_memory_after_deletion(vector<int>& a, int b) {
    int cd = accumulate(a.begin(), a.end(), 0);
    int n = a.size();
    
    if (b > n) {
        return cd;
    }
    
    int max_segment_sum = 0;
    int current_segment_sum = accumulate(a.begin(), a.begin() + b, 0);

    for (int i = 0; i <= n - b; ++i) {
        max_segment_sum = max(max_segment_sum, current_segment_sum);
        if (i + b < n) {
            current_segment_sum = current_segment_sum - a[i] + a[i + b];
        }
    }
    
    max_segment_sum = max(max_segment_sum, current_segment_sum);
    
    return cd - max_segment_sum;
}

Amazon โœ…
def getMaximumPartitions(performance):
    A = performance[0]
    for num in performance[1:]:
        A &= num
    if A > 0:
        return 1
    c = 0
    a = 0
    for num in performance:
        a = num if a == 0 else a & num
        if a == 0:
            c += 1
            a = 0
    return c

Amazon โœ…
Internship opportunity for 2024,2025,2026 batch students

Company: Centre for Development of Telematics (C-D0T)

Eligibility: B.Tech/BE students (CS/EC) who have completed their second-year exams with a minimum CGPA of 7.0 or 70%.

Duration: Minimum 3 months to a maximum of 1 year. Stipend: 50,000/month + access to subsidized facilities.

Interview location: Bangalore/Delhi last date:31 Oct 2024.

Submit your CV and application form to internship@cdot.in

Shortlisted candidates will be called for an interview.
#include <bits/stdc++.h>
using namespace std;

int cleanupDataset(string dataset, int x, int y) {
    int freq[26] = {0};
    for(char c : dataset) {
        freq[c - 'a']++;
    }
   
    long long s_max = 0;
    for(int i = 0; i < 26; i++) {
        s_max += freq[i] / 2;
    }
   
    long long N = dataset.length() / 2;
   
    if(x <= y){
        long long cost = s_max * (long long)x + (N - s_max) * (long long)y;
        return (int)cost;
    }
    else{
        long long cost = N * (long long)y;
        return (int)cost;
    }
}

Amazon โœ