allcoding1
27.7K subscribers
2.2K photos
2 videos
77 files
852 links
Download Telegram
🎯Aera Hiring Automation Engineer Intern

Graduation Year: 2023 / 2024

Eligibility: Having a degree in Computer Science, Information Technology, or a related field; graduated in 2023 or after

Location: Pune

Apply Now:- www.allcoding1.com

Telegram:- @allcoding1
🎯Qualcomm Hiring Engineering Interns


Eligibility: Bachelor's or Master's Degree in Electrical Engineering, Computer Science Engineering, Communication Engineering, Electronics & Communications Engineering

1. Software Engineering Intern:
Graduation Year: 2024

2. Hardware Engineering Intern:
Graduation Year: 2025
Have Knowledge in PLL, LNA, OpAmp, CMOS, ADC/DAC, Cadence, SpectreRF, or Layout is required in RF/Analog/Mixed Signal IC Design

Location: Telangana, Bangalore, Chennai, Noida

Apply :- www.allcoding1.com

Telegram:- @allcoding1
πŸ‘10😁1
🎯Agoda SDE Tech Internship 2024

Graduation Year: 2025 / 2026

Eligibility: Ongoing pursuit of a Bachelor’s or Master’s Degree in Computer Science or a related field.

Internship period: July – Dec 2024

Interview process:
Registration closes: 21st April 2024
Hacker rank test starts: 26th April 2024
In-office interview date: 3rd May 2024

Location: Gurugram, Haryana

Apply Link: https://careersatagoda.com/job/5417820-tech-internship-2024-india-based-gurgaon-office/

Telegram:- @allcoding1
πŸ‘3
#include <iostream>
#include <string>
using namespace std;

int smallest_possible_number(const string& S) {
    if (S.size() == 1 && S[0] == '0') {
        return -1;
    }

    if (S.find('1') == string::npos) {
        return -1;
    }

    int number = 1;
    int n = S.size();
    for (int i = n - 1; i >= 0; --i) {
        if (S[i] == '1') {
            if (number % (i + 1) != 0) {
                number *= (i + 1);
            }
        } else {
            while (number % (i + 1) == 0) {
                number += 1;
            }
        }
    }
    return number;
}
Base Conversion

Telegram:- @allcoding1
πŸ‘2
#include<bits/stdc++.h>
using namespace std;

int main(){
    string a,b,c; cin>>a>>b>>c;
    vector<int>cnt(26,0);
    for(auto ele: a){
        cnt[ele-'A']++;
    }
    for(auto ele: b){
        cnt[ele-'A']++;
    }
    for(auto ele: c){
        cnt[ele-'A']--;
    }
    bool flag=true;
    for(auto ele: cnt){
        if(ele<0) flag=false;
    }
    if(flag) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}

Magnetic Letters

Telegram:- @allcoding1
πŸ‘2
private static double[] calculateMovingAverage(int[] array, int K) {
        double[] smoothedArray = new double[array.length - K + 1];
        double sum = 0;

      
        for (int i = 0; i < K; i++) {
            sum += array[i];
        }

      
        for (int i = 0; i <= array.length - K; i++) {
            if (i > 0) {
              
                sum = sum - array[i - 1] + array[i + K - 1];
            }
            smoothedArray[i] = sum / K;
        }

        return smoothedArray;
    }

Moving Averages

Telegram:- @allcoding1
πŸ‘5
Moving Average
Python 3

@allcoding1
πŸ‘1πŸ‘Ž1
Money Count

@allcoding1
Case Changer

@allcoding1
#include <iostream>
#include <vector>
using namespace std;

vector<int> HeightProblem(int n, vector<int>& arr) {
    vector<int> ans(n);

    for (int i = 0; i < n; ++i) {
        int height = arr[i];
        int closestLeftHeight = -1;

        for (int j = i - 1; j >= 0; --j) {
            if (arr[j] < height) {
                closestLeftHeight = arr[j];
                break;
            }
        }

        ans[i] = closestLeftHeight;
    }

    return ans;
}

Height problem

@allcoding1
πŸ‘2
#include<bits/stdc++.h>
#define ll long long
using namespace std;

ll solve(vector<int>a)
{
   set<int>s(a.begin(),a.end());
   ll mex=0;
    while (s.count(mex)) mex++;
   ll ans=distance(s.lower_bound(mex),s.end());
   if(ans==a.size()) return -2;
   return ans;
}
int main() {
    int n; cin>>n;
    vector<int>arr(n);
    for(int i=0;i<n;i++) cin>>arr[i];
    cout<<solve(arr);
    return 0;
}

Mex Number

@allcoding1
πŸ‘1
import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int energy = sc.nextInt();
        int maxDrink = sc.nextInt();
        int maxGoodEnergy = 0;
        int maxGoodNumber = 0;
        for (int i = 1; i <= maxDrink; i++) {
            int goodEnergy = energy * i;
            int goodNumber = 0;
            while (goodEnergy % 10 == 0) {
                goodNumber++;
                goodEnergy /= 10;
            }
            if (goodNumber > maxGoodNumber) {
                maxGoodNumber = goodNumber;
                maxGoodEnergy = energy * i;
            } else if (goodNumber == maxGoodNumber) {
                maxGoodEnergy = Math.max(maxGoodEnergy, energy * i);
            }
        }
        System.out.println(maxGoodEnergy);
    }
}

Airtel shecode

@allcoding1
πŸ‘2
#include<bits/stdc++.h>
using namespace std;

bool solve(char c) {
    c = tolower(c);
    return !(c == 'a' c == 'e' c == 'i' c == 'o' c == 'u') && c >= 'a' && c <= 'z';
}

int main() {
    string s;
    cin >> s;
    int count = 0;
    for(int i = 0; i < s.length(); i += 2) {
        if(solve(s[i])) {
            count++;
        }
    }
    cout << count << endl;
    return 0;
}

Airtel Shecode
anabellle
@allcoding1
#include <iostream>

using namespace std;

int main() {
    int e, d;
    cin >> e >> d;
   
    int mE = 0;
    int mN = 0;
   
    for (int i = 1; i <= d; i++) {
        int gE = e * i;
        int gN = 0;
       
        while (gE % 10 == 0) {
            gN++;
            gE /= 10;
        }
       
        if (gN > mN) {
            mN = gN;
            mE = e * i;
        } else if (gN == mN) {
            mE = max(mE, e * i);
        }
    }
   
    cout << mE << endl;
   
    return 0;
}


goodenergy

@allcoding1
πŸ‘1
#include <bits/stdc++.h>
using namespace std;

#define ll long long

int main() {
    ll n;
    cin >> n;
    vector<ll> v(n);
    for(ll i=0; i<n; i++)
        cin >> v[i];

    sort(v.begin(), v.end());

    ll sum = 0;
    for(ll i=0; i<n; i++) {
        if(sum + v[i] < 0)
            return cout << -1, 0;
        sum += v[i];
    }

    if(sum % 2 == 0)
        cout << -1;
    else
        cout << sum;

    return 0;
}


fortunejob

@allcoding1
allcoding1
Photo
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
using namespace std;

int getMaxMedian(vector<int> lower_bound, vector<int> upper_bound, long int max_sum) {
    int n = lower_bound.size();
    long long curr_sum = 0;
    for (int i = 0; i < n; ++i) {
        curr_sum += lower_bound[i] + upper_bound[i];
    }
    int num_elements = 2 * n;
    long long target_sum = curr_sum + max_sum;
    sort(upper_bound.begin(), upper_bound.end());
    int median_index = num_elements / 2;
    int left = 1, right = INT_MAX;
    while (left <= right) {
        int mid = left + (right - left) / 2;
        long long sum = 0;
        for (int i = 0; i < n; ++i) {
            if (upper_bound[i] <= mid) {
                sum += upper_bound[i];
            } else {
                sum += mid;
            }
        }
        if (sum <= target_sum) {
            left = mid + 1;
        } else {
            right = mid - 1;
        }
    }
    return right;
}

int main() {
    int n;
    cin >> n;
    vector<int> lower_bound(n);
    vector<int> upper_bound(n);
    for (int i = 0; i < n; ++i) {
        cin >> lower_bound[i];
    }
    for (int i = 0; i < n; ++i) {
        cin >> upper_bound[i];
    }
    long int max_sum;
    cin >> max_sum;
    int max_median = getMaxMedian(lower_bound, upper_bound, max_sum);
    cout << max_median << endl;
    return 0;
}

DE Shaw

@allcoding1
πŸ‘2
#include <iostream>
#include <vector>
using namespace std;

const int MOD = 1e9 + 7;

int F(int i, int k, int n, vector<int> &level, vector<int> &dp) {
    if (i == n) return 1;
    if (dp[i] != -1) return dp[i];
    int ans = 0, odds = 0;
    vector<int> hash(n + 10, 0);
    for (int j = i; j < n; j++) {
        if (++hash[level[j]] % 2 == 0) odds -= 1;
        else odds += 1;
        if (odds <= k) {
            ans = (ans + F(j + 1, k, n, level, dp)) % MOD;
        }
    }
    return dp[i] = ans;
}

int countValidPartitions(vector<int> level, int k) {
    int n = level.size();
    vector<int> dp(n, -1);
    return F(0, k, n, level, dp);
}

DE Shaw

@allcoding1
πŸ‘1
import heapq

def distance(x, y):
    return x*x + y*y

def nearest_houses(P, T, queries):
    distances = []
    heapq.heapify(distances)

    for query in queries:
        if query[0] == 1:
            x, y = query[1], query[2]
            heapq.heappush(distances, distance(x, y))
        else:
            nearest = heapq.nsmallest(T, distances)[-1]
            print(nearest)

Nearest House

@allcoding1
πŸ‘3