๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
class UserMainCode(object):
def magicString(cls, input1):
from collection import counter
freq = Counter(input1)
maxi = max(freq, key = freq.get)
return len(input1) - input1.count(maxi)


Magic Stringโœ…
Accenture
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 โœ…
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 โœ