๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.57K subscribers
5.59K photos
3 videos
95 files
10K 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
import re

a = int(input().strip())
b = set()
c = r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b'

for _ in range(a):
    line = input().strip()
    b.update(re.findall(c, line))

print(';'.join(sorted(b)))
int solve(int k, vector<int>& s) {
    sort(s.rbegin(), s.rend());
    int c = 0;
    for (int i = 0; i < s.size(); i++) {
        if (i < k && s[i] > 0) {
            c++;
        } else if (s[i] == s[i - 1] && s[i] > 0) {
            c++;
        } else {
            break;
        }
    }
    return c;
}

Competitive Gaming โœ…
long getMaxPrisonHole(int n, int m, vector<int> x, vector<int> y) {
    vector<bool> xb(n+1, true);
    vector<bool> yb(m+1, true);
   
    for(int i : x) {
        xb[i] = false;
    }
   
    for(int i : y) {
        yb[i] = false;
    }
   
    long cx = 0, xm = LONG_MIN, cy = 0, ym = LONG_MIN;
   
    for(int i = 0; i < xb.size(); i++) {
        if(xb[i]) {
            cx = 0;
        } else {
            cx++;
            xm = max(cx, xm);
        }
    }
   
    for(int i = 0; i < yb.size(); i++) {
        if(yb[i]) {
            cy = 0;
        } else {
            cy++;
            ym = max(cy, ym);
        }
    }
   
    return (xm+1) * (ym+1);


Swiggy
Prison Break โœ…
public static int selectStock(int saving, int[] currentValue, int[] futureValue) {
        int n = currentValue.length;
        int[][] dp = new int[n + 1][saving + 1];

        for (int i = 1; i <= n; i++) {
            for (int j = 0; j <= saving; j++) {
                dp[i][j] = dp[i - 1][j];

                if (j >= currentValue[i - 1]) {
                    dp[i][j] = Math.max(dp[i][j], dp[i - 1][j - currentValue[i - 1]] + futureValue[i - 1] - currentValue[i - 1]);
                }
            }
        }

        return dp[n][saving];
    }. 

Swiggy

Selecting  Stocks โœ…
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int findLIS(vector<int>& s) {
    vector<int> tails;

    for (int x : s) {
        auto it = lower_bound(tails.begin(), tails.end(), x);
        if (it == tails.end()) {
            tails.push_back(x);
        } else {
            *it = x;
        }
    }

    return tails.size();
}  

Swiggy
LISโœ…
Company โ€“ Bristol Myers Squibb
Role โ€“ Data Scientist
Exp. โ€“ 0-3 yrs

Responsibilities โ€“
The Data Scientist I will play a crucial role in supporting operational analytics across GPS to ensure products continue to serve most pressing GPS analytics needs, with potential opportunities to build new advanced analytics capabilities such as predictive modelling, simulation, and optimization. The Data Scientist I should have a strong interest in solving business problems, and an eagerness to work on all parts of the analytics value chain, from partnering with IT on data pipelines to operationalizing predictive models in the service of our patients around the world.

Skills โ€“
โ€ขProven experience  in a data and analytics role, including direct development experience.
โ€ขExperience working with large datasets, data visualization tools, statistical software packages and platforms (specifically R, Python, advanced SQL, Domino, AWS, GitHub, dbt, Tableau)
โ€ขExperience with major GPS applications (SAP, Oracle, LIMS, Infinity, MES) is a plus.
โ€ขExperience with biotech product development, manufacturing operations, supply chain, and quality control is a significant plus.
โ€ขExperience in the biopharma industry a plus.

Apply Here โ€“ https://www.linkedin.com/jobs/view/3912975400
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int numDecodings(string msg) {
    int MOD = 1000000007;
    int n = msg.size();
   
    vector<long long> dp(n + 1, 0);
    dp[0] = 1;
   
    if (msg[0] == '0')
        dp[1] = 0;
    else if (msg[0] == '*')
        dp[1] = 9;
    else
        dp[1] = 1;
   
    for (int i = 2; i <= n; ++i) {
        if (msg[i - 1] == '0') {
           
            if (msg[i - 2] == '1' || msg[i - 2] == '2')
                dp[i] += dp[i - 2];
            else if (msg[i - 2] == '*')
                dp[i] += 2 * dp[i - 2];
        } else if (msg[i - 1] >= '1' && msg[i - 1] <= '9') {
     
            dp[i] += dp[i - 1];
           
            if (msg[i - 2] == '1' || (msg[i - 2] == '2' && msg[i - 1] <= '6'))
                dp[i] += dp[i - 2];
            else if (msg[i - 2] == '*') {
               
                if (msg[i - 1] <= '6')
                    dp[i] += 2 * dp[i - 2];
                else
                    dp[i] += dp[i - 2];
            }
        } else if (msg[i - 1] == '*') {
            dp[i] += 9 * dp[i - 1];
           
            if (msg[i - 2] == '1')
                dp[i] += 9 * dp[i - 2];
            else if (msg[i - 2] == '2')
                dp[i] += 6 * dp[i - 2];
            else if (msg[i - 2] == '*')
                dp[i] += 15 * dp[i - 2];
        }
       
        dp[i] %= MOD;
    }
   
    return dp[n];
}

Number of ways decode โœ…
def getPasswordStrength(passwords, common_words):
    result = []
    for password in passwords:
        is_weak = False
       
        if password.lower() in common_words:
            is_weak = True
        else:
            for word in common_words:
                if word.lower() in password.lower():
                    is_weak = True
                    break
       
        if password.isdigit():
            is_weak = True
       
        if password.islower() or password.isupper():
            is_weak = True
       
        if len(password) < 6:
            is_weak = True
       
        result.append("weak" if is_weak else "strong")
   
    return result

Password Validation โœ…
๐Ÿ‘1๐Ÿ˜ฑ1
def groupTransactions(transactions):
    counts = {}
    for item in transactions:
        if item in counts:
            counts[item] += 1
        else:
            counts[item] = 1
   
    sorted_items = sorted(counts.items(), key=lambda x: (-x[1], x[0]))
   
    result = []
    for item, count in sorted_items:
        result.append(f"{item} {count}")
   
    return result

Group Transactionsโœ…
def getPasswordStrength(passwords, common_words):
    result = []
    for password in passwords:
        is_weak = False
       
        if password.lower() in common_words:
            is_weak = True
        else:
            for word in common_words:
                if word.lower() in password.lower():
                    is_weak = True
                    break
       
        if password.isdigit():
            is_weak = True
       
        if password.islower() or password.isupper():
            is_weak = True
       
        if len(password) < 6:
            is_weak = True
       
        result.append("weak" if is_weak else "strong")
   
    return result


GetPasswordStrengthโœ…
def binary_converter(binary, base='d'):
    binary_str = ''.join(map(str, binary))
    decimal_num = int(binary_str, 2)
    if base == 'd':
        return str(decimal_num)
    elif base == 'b':
        return bin(decimal_num)[2:]
    elif base == 'o':
        return oct(decimal_num)[2:]
    elif base == 'x':
        return hex(decimal_num)[2:]
    else:
        return "Invalid base"


Python Binary converter โœ…
def find_suspicious_users(logs, threshold):
    transaction_count = {}
   
    for log in logs:
        sender, recipient, _ = log.split()
        transaction_count[sender] = transaction_count.get(sender, 0) + 1
        transaction_count[recipient] = transaction_count.get(recipient, 0) + 1
   
    suspicious_users = [user_id for user_id, count in transaction_count.items() if count >= threshold]
   
    return sorted(suspicious_users, key=int)


Find Suspicious Usersโœ