๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
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โœ…
def stemmer(text):
    stemmed_text = []
    suffixes = ['ed', 'ly', 'ing']
   
    for word in text.split():
        if word.endswith(tuple(suffixes)):
            word = word[:-2] if word.endswith('ed') else word[:-3]
            if len(word) > 8:
                word = word[:8] 
        stemmed_text.append(word)
   
    return ' '.join(stemmed_text)

Suffix stripping stemmer โœ…
import pandas as pd


def saleorder(df):
    grouped = df.groupby(['date added', 'type'])
    for (_, group), (_, sold_group) in zip(grouped, grouped):
        if group['type'].iloc[0] == 'Received':
            received_sizes = group['sizes'].str.split('/').explode().unique()
            sold_sizes = sold_group['sizes'].str.split('/').explode().unique()
            if all(size in sold_sizes for size in received_sizes):
                print("Possible")
            else:
                print("Not Possible")



Verify Sale Orderโœ…
๐Ÿ‘1
class Message(object):
    def init(self, message: str, sender: int, receiver: int) -> None:
        self.message = message
        self.sender = sender
        self.receiver = receiver

    def str(self) -> str:
        return self.message

    def eq(self, other: object) -> bool:
        if not isinstance(other, Message):
            return False
        return self.message == other.message

Message Objects โœ