allcoding1
27.2K subscribers
2.2K photos
2 videos
77 files
856 links
Download Telegram
Kill the enemy
C++
Amazon 1.15 PM


#include <vector>
#include <algorithm>

int solve(std::vector<int> &A, int B) {
long long m1 = 0, m2 = 0;

for (int val : A) {
if (val > m1) {
m2 = m1;
m1 = val;
} else if (val > m2) {
m2 = val;
}
}

long long b = B;
long long s = m1 + m2;

if (s == 0) {
return b > 0 ? -1 : 0;
}

long long k = b / s;
int ans = k * 2;
long long rem = b % s;

if (rem == 0) {
return ans;
} else if (rem <= m1) {
return ans + 1;
} else {
return ans + 2;
}
}
1
Company: IBM
Role: Software Engineer
Experience: 0–1 Year
Location: India
Direct Apply Link: https://ibmglobal.avature.net/en_US/careers/JobDetail/Software-Engineer/49537
2
Qualcomm – Engineer Roles
Location: India
Experience: 0-2 yrs
Apply Direct: https://careers.qualcomm.com/careers/job/446706882405?hl=en-US&domain=qualcomm.com&source=APPLICANT_SOURCE
2
GE Healthcare is hiring for Trainee Engineer
Experience: 0 - 2 years
Apply now: https://careers.gehealthcare.com/global/en/job/GEVGHLGLOBALR4028147EXTERNALENGLOBAL/Trainee-Engineer
4
American Chase hiring Associate System Engineer

2025 batch passouts eligible

Apply Link : https://americanchase.keka.com/careers/jobdetails/88834
2