๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
am looking for Data Science Interns with Work From Home opportunity at Meritshot. Anybody who wants to grab this opportunity to work as a Data Science Intern can apply by sharing their resume at career@meritshot.com

You can apply even if you have zero experience in Data Science. You just need to have a willingness to learn and explore Data Science and Machine Learning.
#include<bits/stdc++.h>
using namespace std;

int main() {
    int N, K;
    cin >> N ;

    vector<int> d(N);
    for (int i = 0; i < N; ++i) {
        cin >> d[i];
    }
   
    cin >> K;
   
    int t = 0, r = 0;
    for (int i = 0; i < N; ++i) {
        if (d[i] == 1) {
            ++t;
        } else {
            ++r;
        }
    }

    if (r == 0) {
        cout << "0\n";
        return 0;
    }

    if (r < K) {
        cout << "-1\n";
        return 0;
    }

    int it = 0;
    while (r > 0) {
        r -= K;
        ++it;
    }

    cout << it << "\n";
    return 0;
}

//telecom company gwc
int solve(vector<int>& arr, int n) {
    int max_range = 0;
    int min_val, max_val;

    for (int i = 0; i < n && n - i > max_range; i++) {
        min_val = max_val = arr[i];

        for (int j = i; j < n; j++) {
            min_val = min(min_val, arr[j]);
            max_val = max(max_val, arr[j]);

            if (2 * min_val <= max_val) {
                break;
            }

            max_range = max(max_range, j - i + 1);
        }
    }

    return n - max_range;
}. 
//chat application flipkart