allcoding1
27.7K subscribers
2.2K photos
2 videos
74 files
851 links
Download Telegram
4) leave

Telegram:- @allcoding1
1
Renowed

Telegram:- @allcoding1
C D B A

Telegram:- @allcoding1
This media is not supported in your browser
VIEW IN TELEGRAM
Has replaced
Cabal
Credulous
159 km/hr
Ans) D
C
D
LBFJH
C
C
👍1
5500
encoded_value = ""

for digit in str(input1):

encoded_value += str(int(digit) ** 2)
return int(encoded_value)


Minimum array sum
int winning_party(int voters, int votes[]) {
    unordered_map<int, int> vote_counts;
   
    for (int i = 0; i < voters; ++i) {
        vote_counts[votes[i]]++;
    }
   
    for (auto it = vote_counts.begin(); it != vote_counts.end(); ++it) {
        if (it->second > voters / 2) {
            return it->first;
        }
    }
   
    return -1;
}

Elections
Elections code
Advanced SubArray Problem
👍1
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


Telegram:- @allcoding1
👍2