๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.55K photos
3 videos
95 files
9.64K 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
FresherOpportunityAlert

Yash Technologies is hiring Fresher - Trainee Consultant -SAP - ABAP for Hyderabad

Experience: 0-1 Years

Job Description
Perform as an individual contributor with fair degree of accountability with minimum assistance.
Execute unit testing to ensure the accuracy of his/her developments.

Link to apply: https://careers.yash.com/job/Hyderabad-Trainee-Consultant-SAP-ABAP-Job/1052844966/?
#include <iostream>
#include <vector>
#include <string>

using namespace std;

const long long PRIME = 53;
const long long MOD = 1e9 + 7;

void solve() {
    string s;
    cin >> s;

    long long n = s.size();
    vector<long long> pow(n);
    vector<long long> dp(n + 1);

    pow[0] = 1;
    for (long long i = 1; i < n; i++) {
        pow[i] = (pow[i - 1] * PRIME) % MOD;
    }

    dp[0] = 0;
    for (long long i = 0; i < n; i++) {
        dp[i + 1] = (dp[i] + (s[i] - 'a' + 1) * pow[i]) % MOD;
    }

    auto calc = [&](int l, int r) -> long long {
        long long hash_value = (dp[r] - dp[l] + MOD) % MOD;
        hash_value = (hash_value * pow[n - 1 - l]) % MOD;
        return hash_value;
    };

    long long count = 0;

    for (long long i = 0; i < n; i++) {
        long long remaining_length = n - 2 * i;
        if (remaining_length % 2 == 1) continue;

        if (calc(0, i) == calc(i, 2 * i)) {
            long long half_remaining_length = remaining_length / 2;
            if (calc(2 * i, 2 * i + half_remaining_length) == calc(2 * i + half_remaining_length, n)) {
                count++;
            }
        }
    }

    cout << count << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int t;
    cin >> t;
   
    while(t--) solve();

    return 0;
}

Break the string โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
import collections

def bioHazard(n, allergic, poisonous):
    d = collections.defaultdict(lambda: -1)
   
    for a, b in zip(allergic, poisonous):
        a, b = sorted([a, b])
        d[b] = max(d[b], a)

    for i in range(1, n + 1):
        d[i] = max(d[i], d[i - 1])

    res = 0
    for i in range(1, n + 1):
        if d[i] == -1:
            res += i
        else:
            res += i - d[i]
   
    return res

Biological Hazards โœ…
MSCI
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
import java.util.ArrayList;
import java.util.List;

public class Main {

    static class TreeNode {
        int value;
        List<TreeNode> children;

        TreeNode(int value) {
            this.value = value;
            this.children = new ArrayList<>();
        }
    }

    public static int calculateMax(int networkNodes, int[] networkFrom, int[] networkTo, int[] frequency) {
        List<List<Integer>> con = new ArrayList<>();
        for (int i = 0; i < networkNodes; i++) {
            con.add(new ArrayList<>());
        }

        for (int i = 0; i + 1 < networkNodes; ++i) {
            con.get(networkFrom[i] - 1).add(networkTo[i] - 1);
            con.get(networkTo[i] - 1).add(networkFrom[i] - 1);
        }

        int[] result = {0};
        dfs(0, -1, con, frequency, result);

        return result[0];
    }

    private static int dfs(int x, int f, List<List<Integer>> con, int[] v, int[] r) {
        int m1 = 0, m2 = 0;
        for (int y : con.get(x)) {
            if (y != f) {
                int m = dfs(y, x, con, v, r) + 1;
                if (Math.abs(v[y] - v[x]) <= 1) {
                    if (m >= m1) {
                        m2 = m1;
                        m1 = m;
                    } else if (m > m2) {
                        m2 = m;
                    }
                }
            }
        }
        r[0] = Math.max(r[0], m1 + m2);
        return m1;
    }

Radio Waves โœ…
eClerx is hiring for a Financial Markets-Analyst-Finance
Analyst at eClerx...

Location - Chandigarh

Eligibility - Freshers as well as Experienced.

Candidates should be comfortable working in all
shifts i.e APAC/EMEA/Night shift.

Interested candidates
Share your CV on

Chinmay.Rode.C@eclerx.com
Exciting Data Analyst Internship at GoMechanic.in

Are you ready to dive into the world of data analysis? GoMechanic is seeking Data Analyst Interns in Gurugram for a 3 Months full-time internship with a stipend of up to 15k. If you have a knack for Tableau, Python, and a passion for analytics, this is your chance to shine!

What You'll Get:
1. Hands-on experience with real projects
2. Flexible working hours
3. Internship certificate
4. Potential for a full-time role based on performance

Requirements:
1. Proficiency in Tableau and Python
2. Strong analytical and problem-solving skills
3. Excellent communication skills

Apply Now: Share your CV

https://www.linkedin.com/posts/lalitdabas228_exciting-data-analyst-internship-atgomechanicin-activity-7210495419452125185-aJfS?utm_source=share&utm_medium=member_ios