๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
https://www.linkedin.com/posts/reenu-s_insuretech-entrylevel-careeropportunity-activity-7231913037518020608-THM1?utm_source=share&utm_medium=member_desktop

#Duck Creek is inviting applications for its first ever hashtag#Talent Acceleration Program (Cohort) for India. Share your CV at *reenu.sura@duckcreek.com* if you meet below eligibility criteria:
- Graduated in 2023/2024
- BTech/B.E. (Computer Science Engineering OR Information Technology) OR MTech/M.E. (Computer Science Engineering)
- CGPA of 7.5 or higher (equivalent to 70% or more)
- Understand object-oriented design and coding in Java or C# or .NET

If you have completed any Industry internship or bootcamp trainings - it will be a plus.

hashtag#Early Careers Job Opportunity hashtag#Freshers Hiring hashtag#Cohort
๐Ÿ‘1
#include <iostream>
#include <string>
using namespace std;
int ss(char c, char f) {
    if (f >= c) {
        return f - c;
    } else {
        return (f - c + 26) % 26;
    }
}
int main() {
    string C, F;
    int N;
    cin >> C >> F >> N;
    int len = C.length();
    int t = 0;
    int s = 0;
    for (int i = 0; i < len; i++) {
        t += ss(C[i], F[i]);
        s += (i + 1);
    }
    if (t <= s) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}


MAQ โœ…
๐Ÿ‘1
def getMergedIntervals(intervals):
    intervals.sort(key=lambda x: x[0])
    huihui = []

    for interval in intervals:
        if not huihui or huihui[-1][1] < interval[0]:
            huihui.append(interval)
        else:
            huihui[-1][1] = max(huihui[-1][1], interval[1])
           
    return huihui


Merge intervals โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
process.stdin.resume();
process.stdin.setEncoding('utf-8');

var input_ = "";

process.stdin.on('data', function (data) {
    input_ += data.toString(); 
});

function count_like_dislike(A, P) {
    // Write your code here
    let count = 0;

    if (A.length > 0 && P.length > 0) {
        let a = A.split('');
        let p = P.split('');

        if (a.length >= p.length) {
            for (let i = 0; i < a.length; i++) {
                if (i < p.length && a[i] === p[i]) {
                    count++;
                }
            }
        } else {
            for (let i = 0; i < p.length; i++) {
                if (i < a.length && a[i] === p[i]) {
                    count++;
                }
            }
        }
    }

    return count.toString(); 
}

process.stdin.on('end', function () {
    input_ = input_.split("\n");
    var A = input_.shift();
    var P = input_.shift();

    var out_ = count_like_dislike(A, P);
    process.stdout.write(out_ + '\n');
   
    process.exit();
});

Number of likes and dislikes โœ…
import java.util.List;
public class Main {
    public static long getMaximumSumOfStrengths(List<Integer> arr) {
        int n = arr.size();
        if (n == 0) {
            return 0;
        }

       long[] a = arr.stream().mapToLong(Integer::longValue).toArray();
        long[][] dp = new long[n][2];
        dp[0][0] = a[0];
        dp[0][1] = a[0];
        for (int i = 1; i < n; i++) {
            dp[i][0] = Math.max(dp[i - 1][0], dp[i - 1][1]) + a[i] * (i + 1);
            dp[i][1] = a[i] * i + a[i - 1] * (i + 1) + (i - 2 >= 0 ? Math.max(dp[i - 2][0], dp[i - 2][1]) : 0);
        }
        return Math.max(dp[n - 1][0], dp[n - 1][1]);
    }
}



Element Swapping โœ…
Oracle
โค1๐Ÿ‘1
#include <string>
#include <unordered_map>
int ss(const std::string& S) {
unordered_map<char, int> freq;
        for (char c : S) {
        freq[c]++;
    }
    int a = 0;
    for (const auto& entry : freq) {
        if (entry.second % 2 != 0) {
            a++;
        }
    }
    if (a <= 1) {
        return 0;
    }

    return a - 1;
}

`
String Substring โœ…
DB