๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.61K photos
3 videos
95 files
10.6K 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
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
using namespace std;

const int MOD = 1e9 + 7;

class SegmentTree {
    int n;
    vector<long long> t;
    bool isSum;

public:
    SegmentTree(const vector<int>& v, bool sum) : n(v.size()), isSum(sum) {
        t.resize(2 * n, sum ? 0 : 1);
        for (int i = 0; i < n; ++i) {
            t[i + n] = v[i];
        }
        for (int i = n - 1; i > 0; --i) {
            t[i] = isSum ? (t[2 * i] + t[2 * i + 1]) % MOD : (t[2 * i] * t[2 * i + 1]) % MOD;
        }
    }

    long long query(int l, int r) {
        long long res = isSum ? 0 : 1;
        l += n;
        r += n;
        while (l < r) {
            if (l & 1) {
                res = isSum ? (res + t[l]) % MOD : (res * t[l]) % MOD;
                ++l;
            }
            if (r & 1) {
                --r;
                res = isSum ? (res + t[r]) % MOD : (res * t[r]) % MOD;
            }
            l /= 2;
            r /= 2;
        }
        return res;
    }
};

vector<long long> HardQueries(int n, const vector<int>& v, int q, const vector<vector<int>>& queries) {
    vector<long long> ans;
    SegmentTree sumTree(v, true);
    SegmentTree prodTree(v, false);

    for (const auto& x : queries) {
        int type = x[0], a = x[1] - 1, b = x[2];
        vector<int> indices;
        for (int i = a; i < n; i += b) {
            indices.push_back(i);
        }

        if (type == 0) {
            long long res = 0;
            for (int idx : indices) {
                res = (res + sumTree.query(idx, idx + 1)) % MOD;
            }
            ans.push_back(res);
        } else if (type == 1) {
            long long res = 1;
            for (int idx : indices) {
                res = (res * prodTree.query(idx, idx + 1)) % MOD;
            }
            ans.push_back(res);
        }
    }

    return ans;
}


queries and fruitsโœ…
โค1๐Ÿ‘1
๐Ÿ“ข Hiring Alert: Data Science Interns Wanted! (Offline, Full-Time, 3 Months)

Location - Indore

Seeking enthusiastic, data-driven individuals for a full-time, on-site internship lasting 3 months! This is a unique opportunity to dive into real-world data science projects, collaborate with industry experts, and build valuable skills in a hands-on environment. If you're ready to learn, innovate, and make a difference, weโ€™d love to hear from you!

Note - To be considered for further process,
Mail your resume at ankush.deshmukh@artivatic.ai
mail subject / Title - internship_application
resume - internship_yourname.pdf
๐Ÿ‘2
We're looking for talented B.Tech (CS/IT) & MCA graduates from the 2024/2025 batch to join our team. If you're ready to kickstart your tech career, apply by 20th November 2024 and become part of our innovation-driven culture! Please DM me if you are interested!

#Email- hr@venturesdigitalindia.com
Hello All,
       I am delighted to announce that We are currently hiring freshers with backgrounds in MTech Optical Engineering/ Applied Optics/ Optoelectronics and Optical Communication/ Laser and Electro-Optical Engineering, or Optics and Optoelectronics.
If you are interested, please share your resume with us at suganya.umameshwaran@vcti.io
Thank you,
Suganya
Weโ€™re #Hiring #Freshers! Join Our Dynamic Team! ๐ŸŒŸ

Position: Trainee Software Engineer
Location: Hyderabad
Industry: IT Software
Job Type: Full-time

Role Overview:
We are looking for enthusiastic and motivated Freshers to join our dynamic team. If you are passionate about working with latest technologies, eager to learn, and excited to contribute to a vibrant team environment, this is the perfect opportunity for you!

Key Responsibilities:
Assist with day-to-day tasks and projects
Collaborate with cross-functional teams
Learn and adapt to [specific tools/technologies related to the role]
Contribute fresh ideas and solutions
Participate in training and development sessions to build your skills

Who We Are Looking For:

Recent graduates or individuals with less than 1 year of work experience
Strong communication and interpersonal skills
Eagerness to learn and adapt in a fast-paced environment
Proactive attitude and willingness to take initiative

Skills: Python, React JS, Node JS or any running/upcoming tech stack in the market

Why #AthenaGlobalTechnologiesLtd?
Opportunities for growth and career advancement
A supportive and inclusive work culture
Training and mentorship from experienced professionals

How to Apply:
Please submit your updated resume and a brief cover letter to praveen.pappu@athenagt.com & ramana.singh@athenagt.com
import math
def solve(n, treasures):
    t = treasures
    s = sum(v for _, v in t)
    trg = math.ceil(s / 2)
    t.sort()
    c = 0
    m = float('inf')
    left = 0
    for right in range(n):
        c += t[right][1]
        while c >= trg:
            m = min(m, t[right][0] - t[left][0] + 1)
            c -= t[left][1]
            left += 1
    return m

Teasure division

Asian Paints โœ…
static boolean solve(int n, String s, String t) {
    int[] countS = new int[26];
    int[] countT = new int[26];

    for (int i = 0; i < n; i++) {
        countS[s.charAt(i) - 'a']++;
    }

    for (int i = 0; i < n; i++) {
        countT[t.charAt(i) - 'a']++;
    }

    for (int i = 0; i < 26; i++) {
        if (countS[i] != countT[i]) {
            return false;
        }
    }

    return true;
}

Perfect String โœ…
Netcore
๐Ÿ‘1
int getMaxBeauty(vector<int>&v){
    int n=v.size();
     sort(v.begin(), v.end());

    vector<int> a;
    int half=n/2;
    int i=0;int j=n-1;
    while(i<=j){
        if(i==j){
            a.push_back(v[i]);
            break;
        }
       
        a.push_back(v[j]);
         a.push_back(v[i]);
        i++;j--;
    }

 

    vector<int> preSum(n + 1, 0);
    for (int i = 1; i <= n; i++) {
        preSum[i] = preSum[i - 1] + a[i - 1];
    }

    long long sum=0;
    for(int i=1;i<=n;i++){
        if(i%2==1){
            sum+=preSum[i];
        }
        else{
            sum-=preSum[i];
        }
    }
   
    return sum;
}

IBM โœ…
๐Ÿ‘1