๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.57K subscribers
5.58K photos
3 videos
95 files
9.97K 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
๐Ÿ“ŒWe Urgently Need Manual Testers - (QA Engineers FRESHERS) at Ventures Digital India

Role: Associate Manual Tester [QA Engineer]
Qualification: Bachelor's Degree
Industry: IT/Software
Experience: 0-3 Year

Required Skills:
- Basic knowledge of Manual Testing
- Familiarity with Test Case Creation and Defect Management
- Basic knowledge of JIRA Tools

Note- Hybrid Mode [2 Days work from office]

Email- Neha.Toke@venturesdigitalindia.com
ACCENTURE Interview Experience

1) Self Intro ?
2) Project - Major & Minor ?
3) Difficulty Faced in Project?
4) Least subject u like. Why it is least?
5) Hobbies I said in Self Intro
    From Hobbies ( chess) he Asked y u
    like that,  do u play by Moves Names
    or Randomly Last but not the Least.
6) Do u have any Questions ?
string largestMagical(string binString) {
    if (binString.empty()) return binString;
    vector<string> ans;
    int cnt = 0, j = 0;
    for (int i = 0; i < binString.size(); ++i) {
        cnt += binString[i] == '1' ? 1 : -1;
        if (cnt == 0) {
            ans.push_back("1" + largestMagical(binString.substr(j + 1, i - j - 1)) + "0");
            j = i + 1;
        }
    }
    sort(ans.begin(), ans.end(), greater<string>());
    return accumulate(ans.begin(), ans.end(), string{});
}

Nvidia (intern) โœ…
#include <stdio.h>
#include <regex.h>
int isPowerOfTwo(const char *binaryString) {
    regex_t regex;
    int result;
    result = regcomp(&regex, "^0*10*$", REG_EXTENDED);
    if (result) {
        printf("Could not compile regex\n");
        return 0;
    }
    result = regexec(&regex, binaryString, 0, NULL, 0);
    regfree(&regex);
    if (!result) {
        return 1;
    } else {
        return 0;
    }
}

int main() {
    int t;
    char binaryString[1000];
    scanf("%d", &t);
    while (t--) {
        scanf("%s", binaryString);
        if (isPowerOfTwo(binaryString)) {
            printf("True\n");
        } else {
            printf("False\n");
        }
    }

    return 0;
}


Nvidia โœ…
๐Ÿ‘2
#include <iostream>
#include <vector>
#include <algorithm>

const int MOD = 1e9 + 7;

using namespace std;

long long solve(const vector<int>& a, int b) {
    int c = a.size();
    long long d = 0;
    for (int i = 0; i < c; i++) {
        d += a[i];
    }

    vector<long long> e(b + 1, 0);
    e[0] = 1;

    for (int i = 0; i < c; i++) {
        for (int j = b; j >= a[i]; j--) {
            e[j] = (e[j] + e[j - a[i]]) % MOD;
        }
    }
    long long f = 1;
    for (int i = 0; i < c; i++) {
        f = (f * 2) % MOD;
    }

    long long g = 0;
    for (int i = 0; i <= b; i++) {
        g = (g + e[i]) % MOD;
    }

    long long h = (f - 2 * g + MOD) % MOD;
    return h;
}


Sum of the elements โœ…
Oyo
def solve(n, m, arr):
    mod = 10**9 + 7
    fact = [1] * (n + 1)
    for i in range(2, n + 1):
        fact[i] = fact[i - 1] * i % mod

    arr.sort()
    if n == 1:
        return 1

    val = arr.pop()
    arr[-1] += val

    def mod_inverse(a, mod):
        return pow(a, mod - 2, mod)
   
    ans = fact[n]
    temp = 1
    for count in arr:
        temp = (temp * fact[count]) % mod
   
    temp = mod_inverse(temp, mod)
    return (ans * temp) % mod


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

const int MOD = 1e9 + 7;

class SegmentTree {
    int n;
    vector<long long> t;
    bool isSum;

public:
    SegmentTree(const vector<int>& v, bool sum) : n(v.size()), isSum(sum) {
        t.resize(2 * n, sum ? 0 : 1);
        for (int i = 0; i < n; ++i) {
            t[i + n] = v[i];
        }
        for (int i = n - 1; i > 0; --i) {
            t[i] = isSum ? (t[2 * i] + t[2 * i + 1]) % MOD : (t[2 * i] * t[2 * i + 1]) % MOD;
        }
    }

    long long query(int l, int r) {
        long long res = isSum ? 0 : 1;
        l += n;
        r += n;
        while (l < r) {
            if (l & 1) {
                res = isSum ? (res + t[l]) % MOD : (res * t[l]) % MOD;
                ++l;
            }
            if (r & 1) {
                --r;
                res = isSum ? (res + t[r]) % MOD : (res * t[r]) % MOD;
            }
            l /= 2;
            r /= 2;
        }
        return res;
    }
};

vector<long long> HardQueries(int n, const vector<int>& v, int q, const vector<vector<int>>& queries) {
    vector<long long> ans;
    SegmentTree sumTree(v, true);
    SegmentTree prodTree(v, false);

    for (const auto& x : queries) {
        int type = x[0], a = x[1] - 1, b = x[2];
        vector<int> indices;
        for (int i = a; i < n; i += b) {
            indices.push_back(i);
        }

        if (type == 0) {
            long long res = 0;
            for (int idx : indices) {
                res = (res + sumTree.query(idx, idx + 1)) % MOD;
            }
            ans.push_back(res);
        } else if (type == 1) {
            long long res = 1;
            for (int idx : indices) {
                res = (res * prodTree.query(idx, idx + 1)) % MOD;
            }
            ans.push_back(res);
        }
    }

    return ans;
}


queries and fruitsโœ…
โค1๐Ÿ‘1