๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.62K subscribers
5.59K photos
3 videos
95 files
10.2K 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
Role :- Data Engineer
Skills required:- Python, SQL, Spark , AWS , Snowflake
Experience required:- 2 years+
Company:- A Delhi based startup
Salary (11 Lpa+ )

send your resume:-
https://www.linkedin.com/in/mradaltiwari
Exciting Opportunity for Fresh Graduates - Graduate Engineer Trainees (GETs)

We are thrilled to announce an excellent career opportunity for fresh graduates who are passionate about building a rewarding career in steel industry. As we continue to grow and innovate, we are actively seeking talented and ambitious individuals to join our team as Graduate Engineer Trainees (GETs).

Why Join Us:
1. Comprehensive training program
2. Mentorship from industry experts
3. Opportunities for career advancement
4. Dynamic and collaborative work environment

How to Apply:
If you are ready to kick-start your career with a dynamic and forward-thinking organization, fill the form

https://docs.google.com/forms/d/e/1FAIpQLSfWQyLXfPGFb-stCbYiSIPZaCTHh8grXdt_rSfJ0naWpxolKg/viewform
import java.util.HashMap;
import java.util.Map;

public class CabinAllocation {

    public static int calculatePeopleWithoutCabin(String input) {
        Map<Character, Integer> cabinCount = new HashMap<>();

        for (char c : input.toCharArray()) {
            cabinCount.put(c, cabinCount.getOrDefault(c, 0) + 1);
        }

        int peopleWithoutCabin = 0;
        for (char key : cabinCount.keySet()) {
            int count = cabinCount.get(key);
            if (count % 2 != 0) {
                peopleWithoutCabin += (count - 1) / 2;
            }
        }

        return peopleWithoutCabin;
    }

Java โœ…
How many people didn't get a cabin
def solution(matrix):
    m = len(matrix)
    n = len(matrix[0])

    for k in range((min(m, n) - 1) // 2 + 1):
        A = []

        for j in range(k, n - k):
            A.append(matrix[k][j])

        for i in range(k + 1, m - k):
            A.append(matrix[i][n - k - 1])

        for j in range(n - k - 2, k - 1, -1):
            A.append(matrix[m - k - 1][j])

        for i in range(m - k - 2, k, -1):
            A.append(matrix[i][k])

        A.sort()

        result_idx = 0

        for j in range(k, n - k):
            matrix[k][j] = A[result_idx]
            result_idx += 1

        for i in range(k + 1, m - k):
            matrix[i][n - k - 1] = A[result_idx]
            result_idx += 1

        for j in range(n - k - 2, k - 1, -1):
            matrix[m - k - 1][j] = A[result_idx]
            result_idx += 1

        for i in range(m - k - 2, k, -1):
            matrix[i][k] = A[result_idx]
            result_idx += 1

    return matrix
๐Ÿ‘1
string solve(string s) {
    vector<int> freq(26, 0);
    for (char c : s) {
        freq[c - 'a']++;
    }

    string fh = "", m = "";
    for (int i = 0; i < 26; ++i) {
        if (freq[i] % 2 == 1) {
            if (m == "" || m > string(1, i + 'a')) {
                m = string(1, i + 'a');
            }
        }
        fh += string(freq[i] / 2, i + 'a');
    }

    string sh = fh;
    reverse(sh.begin(), sh.end());

    return fh + m + sh;
}