๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
Samsung India โค๏ธโค๏ธโค๏ธโค๏ธโค๏ธ

Open Positions

Purchase Team:
Total Vacancy: 06
Qual- BE/B.Tech (Mech/EEE/ECE)
Passout- 2022-2023
Exp- 1 year (In Purchase)

Development Engineering (TV) Team:
Total Vacancy: 02
Qual- BE/B.Tech (Plastic Engineering) or Tool Making from NTTF
Passout: 2023-2024


Interview Requirements
*Updated Resume & Photograph
*Govt Id Proof for Gate Entry
*Formal Wear & Shoes


Date of Interview: 8th August, 2024

Reporting Time: 08:30 AM

Venue: Samsung India Electronics Pvt. Ltd., Plot No. P-1, M-5 & M-18, SIPCOT Industrial Park, Phase-II, Sanguvarchatram, Sriperumbudur Taluk, Kancheepuram-602106
๐Ÿ‘1
#include <bits/stdc++.h>
using namespace std;
void calculateRemainder(int N, vector<int> &a, vector<int> &b, int &c, int &d) {
    c = 1 % N;
    d = 0;

    while (c != 0 && b[c] == -1) {
        b[c] = d;
        c *= 10;
        a.push_back(c / N);
        c %= N;
        d++;
    }
}

void reciprocal(int N) {
    if (N == 10) {
        cout << "0.10 0" << endl;
        return;
    }

    vector<int> a;
    vector<int> b(N, -1);
    int c;
    int d;

    calculateRemainder(N, a, b, c, d);

    string result = "0.";
    for (int digit : a) {
        result += to_string(digit);
    }

    if (c == 0) {
        cout << result << " \n";
    } else {
        int rc = b[c];
        string nn = result.substr(0, rc + 2);
        string rp = result.substr(rc + 2);
        cout << nn + rp + " " << rp << endl;
    }
}


BNY Reciprocal โœ…
RMSI Pvt. Ltd. Hiring for the role of Trainee Engineer (GIS) โค๏ธโค๏ธโค๏ธ

Experience:Fresher

Dateof Interview: 10th August, 2024

Time: 9.30 AM โ€“ 3.30 PM

Venue:RMSI Private Ltd, Ascandas IT Park, The V, Vega Building, Gate No. 5, 11th Floor, Right Wing, Plot No.17, Software Units Layout, Madhapur, Hyderabad โ€“ 500 081

Note: Please carry your original ID proof for Entry.

Skills/Requirements:
1. Good communication and good Interpersonal skills and have ability to initiate changes in work process/area & handling additional responsibilities.
2. Proficiency in English communication and comprehension of comments.
3. Should have strong analytical skills and logical thinking. Ability to work in challenging.
4. Situation and adapt for dynamic changes and be flexible.
5. Should be a team player and be proactive in communicating any process gap.
๐Ÿ‘1
#include <iostream>
#define ll long long
using namespace std;
int main(){
  int t; cin>>t;
  while(t-->0){
    ll n, x, y; cin>>n>>x>>y;
    x--; y--;
    if(x>y){
      swap(x, y);
    }
    if(x==y){
      cout<<max(x, n-1-y)<<endl;
      continue;
    }
    ll ans = 1e9;
    for(int i=x; i<=y; i++){
      ll minix = min((i-x),x);
      ll maxix = max((i-x),x);
      ll miniy = min((y-i-1),(n-1-y));
      ll maxiy = max((y-i-1),(n-1-y));
      ans = min(ans, max(2*minix+maxix, 2*miniy + maxiy));
    }
    cout<<ans<<endl;
  }
  return 0;
}


Street Explorer โœ…
def integerThreshold(d, t):
    d.sort() 
    n = len(d)
    count = 0

    for i in range(n - 2):
        a = d[i]
        j, k = i + 1, n - 1 

        while j < k:
            b = d[j]
            c = d[k]

            if a < b < c and a + b + c <= t:
                count += k - j
                j += 1
            else:
                k -= 1 

    return count


Integrated threshold
BNYโœ…
from math import comb

def findPaths(matches, wins):
    if wins > matches:
        return ["Impossible"]
    paths_count = comb(matches, wins)
    if paths_count == 1:
        return ["W" * wins + "L" * (matches - wins)]
   
    paths = []
   
    def genPath(remMatch, remWins, currPath=""):
        if len(currPath) == matches:
            paths.append(currPath)
            return
       
        if remWins > 0:
            genPath(remMatch - 1, remWins - 1, currPath + "W")
        if remMatch - remWins > 0:
            genPath(remMatch - 1, remWins, currPath + "L")
    genPath(matches, wins)
   
    return paths

Cricket Worldcup Qualificationโœ…
def calculateScore(text, prefixString, suffixString):
    n = len(text)
    len_prefix = len(prefixString)
    len_suffix = len(suffixString)
   

    prefix_match_lengths = [0] * n
    suffix_match_lengths = [0] * n

    prefix_match = 0
    for i in range(n):
        if prefix_match < len_prefix and text[i] == prefixString[prefix_match]:
            prefix_match += 1
        prefix_match_lengths[i] = prefix_match
        if prefix_match == len_prefix:
            prefix_match -= 1


    suffix_match = 0
    for i in range(n - 1, -1, -1):
        if suffix_match < len_suffix and text[i] == suffixString[suffix_match]:
            suffix_match += 1
        suffix_match_lengths[i] = suffix_match

        if suffix_match == len_suffix:
            suffix_match -= 1

    best_score = -1
    best_substring = ""

    for i in range(n):
        for j in range(i, n):
            substring_length = j - i + 1
            prefix_score = prefix_match_lengths[j] - (prefix_match_lengths[i - 1] if i > 0 else 0)
            suffix_score = suffix_match_lengths[i] if i + substring_length - 1 < n else 0
            total_score = prefix_score + suffix_score

            if total_score > best_score or (total_score == best_score and substring_length > len(best_substring)):
                best_score = total_score
                best_substring = text[i:j + 1]

    return best_substring


BNY String scoreโœ…
long countSubarrays(vector<int> numbers,int k){
    int N = numbers.size();
    long cnt = 0 , prod = 1;
    for(int L=0,R=0;R<N;R++){
        prod *= numbers[R];
        while(prod > k) prod /= numbers[L++];
        cnt += (R-L+1);
    }
    return cnt;
}

BNYโœ…
#include <iostream>
#include <vector>
#include <string>
const int MOD = 1e9 + 7;
int numDistinctWays(const string& S, const string& T) {
    int m = S.length();
    int n = T.length();
    vector<vector<int>> dp(m + 1, std::vector<int>(n + 1, 0));

    for (int i = 0; i <= m; ++i) {
        dp[i][0] = 1;
    }

    for (int i = 1; i <= m; ++i) {
        for (int j = 1; j <= n; ++j) {
            if (S[i - 1] == T[j - 1]) {
                dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j]) % MOD;
            } else {
                dp[i][j] = dp[i - 1][j];
            }
        }
    }

    return dp[m][n];
}


Trilogy โœ…
bool canDoJob(const vector<bool>& jobSk, const vector<bool>& candSk) {
    for (int i = 0; i < jobSk.size(); ++i) {
        if (jobSk[i] && !candSk[i]) {
            return false;
        }
    }
    return true;
}

int solve(vector<int>& prof, vector<vector<bool>>& jobSk, vector<vector<bool>>& candSk) {
    int numJobs = prof.size();
    int numCands = candSk.size();
    vector<int> dp(1 << numJobs, 0);

    for (int m = 0; m < (1 << numJobs); ++m) {
        for (int i = 0; i < numCands; ++i) {
            for (int j = 0; j < numJobs; ++j) {
                if (!(m & (1 << j)) && canDoJob(jobSk[j], candSk[i])) {
                    dp[m | (1 << j)] = max(dp[m | (1 << j)], dp[m] + prof[j]);
                }
            }
        }
    }

    return dp[(1 << numJobs) - 1];
}

job trilogyโœ…
๐Ÿ‘1