๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.58K 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
ll solver(vll &grid,int n,int m, int row,int col){
    ll cnt=1;
    ll x1=1;
    while(true){
        if(row-x1>=0 and col-x1>=0 and row+x1<n and col+x1<m and grid[row-x1][col-x1]==1 and grid[row-x1][col+x1]==1 and grid[row+x1][col+x1] and grid[row+x1][col-x1]==1){
            x1++;
            cnt++;
        }
        else{
            break;
        }
    }
    return cnt;
}
int help(vll grid,int n,int m){
    ll ans=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            if(grid[i][j]==1)
            ans+=solver(grid,n,m,i,j);
        }
    }
    return ans;
}

Coinbase โœ…
def solution(state, operations):
    n = len(state)
    pq = []

    for i in range(n):
        if state[i] == 0:
            heapq.heappush(pq, i)


    for operation in operations:
        if operation == "L":
            if pq:
                idx = heapq.heappop(pq)
                state[idx] = 1
        elif operation[0] == 'C':
            index = int(operation[1:])
            if state[index] == 1:
                state[index] = 0
                heapq.heappush(pq, index)

    result = ''.join(map(str, state))
   
    return result

Coinbase โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
pair<string, int> pL(const string& l) {
    size_t sp = l.find(' ');
    string n = l.substr(0, sp);
    int t = stoi(l.substr(sp + 1));
    return {n, t};
}

vector<string> sol(vector<vector<string>>& laps) {
    unordered_map<string, int> bt;
    vector<string> d; 
    vector<string> eo;


    for (const string& l : laps[0]) {
        auto [n, t] = pL(l);
        bt[n] = t;
        d.push_back(n);
    }


    for (const auto& lap : laps) {

        for (const string& dl : lap) {
            auto [n, t] = pL(dl);
            bt[n] = min(bt[n], t);
        }


        int sT = 0;
        for (const string& n : d) {
            sT = max(sT, bt[n]);
        }

        vector<string> eD;
        for (auto it = d.begin(); it != d.end();) {
            if (bt[*it] == sT) {
                eD.push_back(*it);
                it = d.erase(it);
            } else {
                ++it;
            }
        }

        sort(eD.begin(), eD.end());
        eo.insert(eo.end(), eD.begin(), eD.end());
    }

    return eo;
}

Coinbase โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
int solution(vector<int>& readings, int k) {
    unordered_set<int> powers;
   
    if (k == 1) {
        for (int reading : readings) {
            if (reading == 1) {
                powers.insert(1);
            }
        }
    } else {
        long long power = 1;
        while (power <= *max_element(readings.begin(), readings.end())) {
            powers.insert(power);
            power *= k;
        }
    }

    int count = 0;
    for (int reading : readings) {
        if (powers.count(reading)) {
            count++;
        }
    }

    return count;
}


Coinbase โœ…
string solution(vector<int>& numbers) {
    int even_sum = 0, odd_sum = 0;
   
    for (int i = 0; i < numbers.size(); ++i) {
        if (i % 2 == 0) {
            even_sum += numbers[i];
        } else {
            odd_sum += numbers[i];
        }
    }
   
    if (even_sum > odd_sum) {
        return "even";
    } else if (odd_sum > even_sum) {
        return "odd";
    } else {
        return "equal";
    }
}


Coinbase โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
public class solve {
    public static String[] solveCodes(String panel, String[] codes) {
        int maxResultSize = codes.length * (codes[0].length() - 1);
        String[] ans = new String[maxResultSize];
        int ansIndex = 0;
        for (String code : codes) {
            int n = code.length();
            for (int i = 1; i < n; i++) {
                String indexStr = code.substring(0, i);
                String pattern = code.substring(i);
                int index = Integer.parseInt(indexStr);
                if (index + pattern.length() <= panel.length()) {
                    String panelSubstr = panel.substring(index, index + pattern.length());
                    if (panelSubstr.equals(pattern)) {
                        ans[ansIndex++] = pattern;
                    } else {
                        ans[ansIndex++] = "not found";
                    }
                } else {
                    ans[ansIndex++] = "not found";
                }
            }
        }

        String[] result = new String[ansIndex];
        System.arraycopy(ans, 0, result, 0, ansIndex);
        return result;
    }


Coinbase โœ…
SELECT 
    v.venue_name,
    COUNT(DISTINCT e.event_id) AS number_of_events,
    ROUND(CAST(COUNT(r.registration_id) AS FLOAT) / NULLIF(COUNT(DISTINCT e.event_id), 0), 2) AS average_registrations
FROM
    Venues v
    JOIN Events e ON v.venue_id = e.venue_id
    LEFT JOIN Registrations r ON e.event_id = r.event_id
WHERE
    (SELECT COUNT(*) FROM Registrations r2 WHERE r2.event_id = e.event_id) > 0
    AND (SELECT COUNT(*) FROM Registrations r2 WHERE r2.event_id = e.event_id) <= v.capacity
GROUP BY
    v.venue_name
ORDER BY
    average_registrations DESC,
    v.venue_name ASC;


Meesho โœ…
โค1
๐Ÿ“ŒWEIR Hiring for Engineer Traniee

Location: Bangalore, Hybrid
Experience: 0 - 3 years

Qualifiactions:
- Candidate with 0-3 years of experience in Software development Fresh Graduate Engineer passed out of university in 2022 would be an ideal fit for this position.
- Educational Qualification: B.E/B.Tech in CS/IS/IT.
- Academic Score: Engineering CGPA 7.5 and above and 12th & 10th - 80%
- Good knowledge of software development using C# and .net core technologies.
- Good understanding API development using .net core, Azure Functions and Postman.
- Knowledge or experience on Azure Cloud will be a huge advantage.

๐Ÿ’ปApply: https://weir.wd3.myworkdayjobs.com/Weir_External_Careers/job/Bangalore/Engineer-Trainee---Digital_R0027003
vector<string> solve(vector<vector<string>> p, vector<string> a, int w) {
    vector<string> r;
    r.push_back(string(w + 2, '*'));
    for(int i = 0; i < p.size(); i++) {
        string l = "";
        for(string wd : p[i]) {
            if(l.size() + wd.size() + (l.empty() ? 0 : 1) > w) {
                if(a[i] == "LEFT") {
                    l += string(w - l.size(), ' ');
                } else if(a[i] == "RIGHT") {
                    l = string(w - l.size(), ' ') + l;
                }
                r.push_back("*" + l + "*");
                l = "";
            }
            if(!l.empty()) {
                l += " ";
            }
            l += wd;
        }
        if(!l.empty()) {
            if(a[i] == "LEFT") {
                l += string(w - l.size(), ' ');
            } else if(a[i] == "RIGHT") {
                l = string(w - l.size(), ' ') + l;
            }
            r.push_back("*" + l + "*");
        }
    }
    r.push_back(string(w + 2, '*'));
    return r;
}

Coinbase โœ…
๐Ÿš€Accenture Mass Hiring

๐ŸŽฏAccenture Innovation Challenge


Graduation Year: 2025 / 2026 / 2027 / 2028

๐ŸŽ“Eligibility:
Accenture Innovation Challenge 2024 is open to undergraduate and postgraduate students (currently full-time students) of all years across all institutes in India

Roles Offered:
1.โ  โ Associate Software Engineer - 4.6 LPA
2.โ  โ System and Application Services Associate - 3.5 LPA

๐Ÿ’ปApply Now: https://vision.hack2skill.com/event/aic2024/