๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.6K 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
string changeCase(string s, int n)
{
    int n = s.size();
    string ans = "";
    if (n == 1)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                a = 1;
            else if (a == 1)
                ans += toupper(s[i]);
            else
                ans += s[i];
        }
    }
    else if (n == 2)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                ans += '-';
            else
                ans += s[i];
        }
    }
    else if (n == 3)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                ans += '_';
            else
                ans += s[i];
        }
    }
    else if (n == 4)
    {
        ans += toupper(s[0]);
        for (int i = 1; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                a = 1;
            else if (a == 1)
                ans += toupper(s[i]);
            else
                ans += s[i];
        }
    }
    return ans;
}

Case Styling
IBM C++โœ…
๐Ÿ‘1
int findMaxmumGreyness(vector<string> grid)
{
    int n = grid.size();
    int m = grid[0].length();
    vector<int> one_row(n, 0);
    vector<int> one_col(m, 0);
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            if (grid[i][j] == '1')
            {
                one_row[i]++;
                one_col[j]++;
            }
        }
    }
    int ans = -1e9;
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            int ans2 = one_row[i] + one_col[j] - (n + m - one_row[i] - one_col[j]);
            ans = max(ans, ans2);
        }
    }
    return ans;
}

Amazon SDE1
C++โœ…
๐Ÿ‘2