๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.59K subscribers
5.59K photos
3 videos
95 files
10.1K 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
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
string makeLexicographicallySmallestPalindrome(string s) { 
    int n=s.length();
    unordered_map<char, int> cnt;
    string R = "";

    for (int i = 0; i < n; i++) {
        char a = s[i];
        cnt[a]++;
    }

    for (char i = 'a'; i <= 'z'; i++) {
        if (cnt[i] % 2 != 0)
            R += i;
    }

    int l = R.length();
    int j = 0;

    for (int i = l - 1; i >= l / 2; i--) {
        cnt[R[i]]--;
        R[i] = R[j];
        cnt[R[j]]++;
        j++;
    }

    string first, middle, second;

    for (char i = 'a'; i <= 'z'; i++) {
        if (cnt[i] != 0) {
            if (cnt[i] % 2 == 0) {
                int j = 0;
                while (j < cnt[i] / 2) {
                    first += i;
                    j++;
                }
            } else {
                int j = 0;
                while (j < (cnt[i] - 1) / 2) {
                    first += i;
                    j++;
                }
                middle += i;
            }
        }
    }

    second = first;
    reverse(second.begin(), second.end());
    string resultant = first + middle + second;
    return resultant;
}


Palindromic Algorithm โœ…
๐Ÿ”ฅ2๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h> 
using namespace std;

class Directory {
public:
    unordered_map<string, unordered_set<string>> children;
    
    Directory(vector<vector<string>>& edges) {
        for (auto& edge : edges) {
            children[edge[0]].insert(edge[1]);
        }
    }
    
    void mkdir(string parent, string folder) {
        children[parent].insert(folder);
    }
    
    void rmdir(string folder) {
        children.erase(folder);
        for (auto& pair : children) {
            pair.second.erase(folder);
        }
    }
    
    int countSubdir(string folder) {
        int count = 1;
        for (auto& child : children[folder]) {
            count += countSubdir(child);
        }
        return count;
    }
};

vector<int> getSubFolders(vector<vector<string>>& existingStructureEdges, vector<string>& queries) {
    Directory dir(existingStructureEdges);
    vector<int> results;
    
    for (string& query : queries) {
        stringstream ss(query);
        string operation, x, y;
        ss >> operation;
        
        if (operation == "mkdir") {
            ss >> x >> y;
            dir.mkdir(x, y);
        } else if (operation == "rmdir") {
            ss >> x;
            dir.rmdir(x);
        } else if (operation == "count_subdir") {
            ss >> x;
            results.push_back(dir.countSubdir(x));
        }
    }
    
    return results;
}


File Structure โœ…
โค1๐Ÿ”ฅ1
int min(string str){
unordered_map<char,int>mp;
for(char :str){
  mp[ch]++;
}
unodered_set<int>d;
for(auto it:mp){
  d.insert(it.second);
}
return d.size();

}

Music Teacher โœ…
Only 4 test cases pass
Manish:
Company Name : Freshworks INC

Role : 1. Application Developer
           2. Software Developer

Package Freshers: 5LPA
Package Experience (1-2 yrs) : 7.5 LPA

Skills Needed : Java , Python , HTML, CSS, Java Script,  SQL and DBMS.

Location: Bangalore and Chennai (currently remote)

Passed out : 2021 - 2025

Round 1 : Coding Assessment Live in Google meet with interviewer (30 mins)

Round 2 : Technical Interview (30 mins)

Round 3 : HR Interview (20 mins)

https://docs.google.com/forms/d/e/1FAIpQLScSh9qPFBce3XvlCUbm4ZpIKuqTcN6IIsdTLPh2WXhAC4XRfQ/viewform?usp=sf_link