def getNumPerfectPackaging(p):
MOD = 10**9 + 7
dp0 = [1] * 6
dp1 = [0] * 6
for i in range(1, len(p)):
c = [0] * 6
for s in range(1, 6):
c[s] = (c[s-1] + dp0[s]) % MOD
tot = c[5]
for s in range(1, 6):
if p[i] > p[i-1]:
dp1[s] = c[s-1]
elif p[i] < p[i-1]:
dp1[s] = (tot - c[s]) % MOD
else:
dp1[s] = (tot - dp0[s]) % MOD
dp0, dp1 = dp1, [0] * 6
return sum(dp0[1:6]) % MOD
Amazon โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company: OpenGig
Role: SDE Intern
Batch: 2025, 2026
Salary : 25-30k [Performance based PPO - 12 LPA]
Apply:
https://docs.google.com/forms/d/e/1FAIpQLSeGx23AxYbiop1q0hNRG8fjrbEdZOBGN1-SCD4QeoqMy6JJBw/viewform
Role: SDE Intern
Batch: 2025, 2026
Salary : 25-30k [Performance based PPO - 12 LPA]
Apply:
https://docs.google.com/forms/d/e/1FAIpQLSeGx23AxYbiop1q0hNRG8fjrbEdZOBGN1-SCD4QeoqMy6JJBw/viewform
Google Docs
OpenGig is Hiring SDE Intern
Company: OpenGig | AI+Humans build software 10x faster
Role: SDE Intern
Duration: 6 months
Salary: 25-30k [Performance based PPO - 12 LPA]
Experience: Past Experience in MERN Stack
Location: Hyderabad/Remote
Number of positions: 2-4
Interview Process: 3 Technicalโฆ
Role: SDE Intern
Duration: 6 months
Salary: 25-30k [Performance based PPO - 12 LPA]
Experience: Past Experience in MERN Stack
Location: Hyderabad/Remote
Number of positions: 2-4
Interview Process: 3 Technicalโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
TurboHire
[Hiring For]: Academic Internship - (B.E/B.Tech 2025)
We are actively looking for highly motivated individuals from the B.Tech 2025 batch to join our software development team for an Academic Internship. Experience in frontend or backend or mobile app development and excellent verbal and written communicationโฆ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
/*
* Complete the 'minTimeForRobots' function below.
*
* The function is expected to return a LONG_INTEGER.
* The function accepts following parameters:
* 1. INTEGER the_number_of_robots
* 2. INTEGER_ARRAY rack_capacities
*/
#include<bits/stdc++.h>
using ll = long long;
using namespace std;
bool canAllocate(const vector<int>& capacities, ll k, ll maxLoad) {
ll robotCount = 1;
ll currentLoad = 0;
for (int cap : capacities) {
if (cap > maxLoad) return false;
if (currentLoad + cap > maxLoad) {
robotCount++;
currentLoad = cap;
if (robotCount > k) return false;
} else {
currentLoad += cap;
}
}
return true;
}
long long minTimeForRobots(int the_number_of_robots, std::vector<int> rack_capacities) {
ll n = rack_capacities.size();
if (the_number_of_robots == 0) return -1;
if(the_number_of_robots>n)return *max_element(rack_capacities.begin(), rack_capacities.end());
ll low = *max_element(rack_capacities.begin(), rack_capacities.end());
ll high = accumulate(rack_capacities.begin(), rack_capacities.end(), 0l);
ll result = high;
while (low <= high) {
ll mid = low + (high - low) / 2;
if (canAllocate(rack_capacities, the_number_of_robots, mid)) {
result = mid;
high = mid - 1;
} else {
low = mid + 1;
}
}
return result;
}
Nvidia โ
def maximumXorSum(arr1, arr2):
n = len(arr1)
MOD = 10**9 + 7
bit_count1 = [0] * 32
bit_count2 = [0] * 32
for i in range(n):
for j in range(32):
bit_count1[j] += (arr1[i] >> j) & 1
bit_count2[j] += (arr2[i] >> j) & 1
total_sum = 0
for i in range(32):
ones = (bit_count1[i] * n) + (bit_count2[i] * n) - (2 * bit_count1[i] * bit_count2[i])
total_sum = (total_sum + (ones * (1 << i))) % MOD
return total_sum
Oracle โ
Maximum Xor matrix Sum
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Nokia is hiring Software Developer
For 2022, 2023 grads
Location: Bangalore
https://fa-evmr-saasfaprod1.fa.ocs.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/job/12508?src=SNS-102
For 2022, 2023 grads
Location: Bangalore
https://fa-evmr-saasfaprod1.fa.ocs.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/job/12508?src=SNS-102
Nokia Global Career Site
Software Developer
Do you thrive in a collaborative environment where you can contribute to building high-quality software solutions? Are you passionate about writing clean, efficient code and working within an agile development process? If so, we have an exciting opportunityโฆ
#include <bits/stdc++.h>
using namespace std;
pair<vector<int>, int> elimination_game(int n) {
deque<int> s(n);
iota(s.begin(), s.end(), 1);
vector<int> result;
bool l2r = true;
while (s.size() > 1) {
int size = s.size();
for (int i = 0; i < size; ++i) {
if ((i % 2 == 0 && l2r) || (i % 2 == 1 && !l2r)) {
result.push_back(s[i]);
} else {
s.push_back(s[i]);
}
}
s.erase(s.begin(), s.begin() + size);
l2r = !l2r;
}
return {result, s.front()};
}
Kickdrum โ
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while(t--) {
int n, k;
cin >> n >> k;
vector<int> a(n);
for(auto &x : a) cin >> x;
int ans = accumulate(a.begin(), a.end(), 0);
for(int i = 0; i + k < n; i++) {
int mn = *min_element(a.begin() + i, a.begin() + i + k + 1);
int sum = 0;
for(int j = 0; j < n; j++) {
if(j >= i && j < i + k + 1) sum += mn;
else sum += a[j];
}
ans = min(ans, sum);
}
cout << ans << '\n';
}
return 0;
}
Kickdrum โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> pouchCount(N + 1, 0);
vector<int> output;
for (int i = 0; i < M; ++i) {
int candies;
cin >> candies;
if (candies > N) {
candies = N;
}
pouchCount[candies]++;
bool canPackBasket = true;
for (int j = 1; j <= N; ++j) {
if (pouchCount[j] == 0) {
canPackBasket = false;
break;
}
}
if (canPackBasket) {
output.push_back(1);
for (int j = 1; j <= N; ++j) {
pouchCount[j]--;
}
} else {
output.push_back(0);
}
}
for (size_t i = 0; i < output.size(); ++i) {
cout << output[i] << (i == output.size() - 1 ? "" : " ");
}
cout << endl;
return 0;
}
Amagi (intern) โ
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int &x : a) cin >> x;
long long sum = accumulate(a.begin(), a.end(), 0LL), pre = 0;
int idx = 0, min_diff = INT_MAX;
for (int i = 0; i < n; ++i) {
pre += a[i];
long long avg1 = pre / (i + 1);
long long avg2 = (sum - pre) / max(1, n - i - 1);
int diff = abs(avg1 - avg2);
if (diff < min_diff) {
min_diff = diff;
idx = i;
}
}
cout << idx+1 << endl;
}
Amagi (Intern) โ
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int &x : a) cin >> x;
long long sum = accumulate(a.begin(), a.end(), 0LL), pre = 0;
int idx = 0, min_diff = INT_MAX;
for (int i = 0; i < n; ++i) {
pre += a[i];
long long avg1 = pre / (i + 1);
long long avg2 = (sum - pre) / max(1, n - i - 1);
int diff = abs(avg1 - avg2);
if (diff < min_diff) {
min_diff = diff;
idx = i;
}
}
cout << idx+1 << endl;
}
Amagi (Intern) โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Exciting opportunity for Data Scientists in Gurgaon! Join the Quant Trading firm to work on parsing and analysing large data sets, discovering new data sources, and building predictive machine learning models.
Responsibilities include:
- Exploring diverse data sets
- Developing a framework to monitor critical data sources
- Implementing machine learning techniques and predictive modelling.
Requirements:
- Technical degree in Computer Science or related field from IIT with 8+ GPA
- Experience in statistical analysis
- Experience with Machine Learning, Development of ML Models
- Proficiency in Linux, Bash, Python, and SQL Database
Work in a dynamic and rewarding environment as a Data Scientist. Please reach out to me at anshulgoel@aquissearch.com for more details.
Responsibilities include:
- Exploring diverse data sets
- Developing a framework to monitor critical data sources
- Implementing machine learning techniques and predictive modelling.
Requirements:
- Technical degree in Computer Science or related field from IIT with 8+ GPA
- Experience in statistical analysis
- Experience with Machine Learning, Development of ML Models
- Proficiency in Linux, Bash, Python, and SQL Database
Work in a dynamic and rewarding environment as a Data Scientist. Please reach out to me at anshulgoel@aquissearch.com for more details.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Commerce IQ is hiring Software Engineer (UI)
For 2021, 2022, 2023 grads
Location: Bangalore
https://job-boards.greenhouse.io/commerceiq/jobs/6242977003?gh_src=6c2d12b73us
For 2021, 2022, 2023 grads
Location: Bangalore
https://job-boards.greenhouse.io/commerceiq/jobs/6242977003?gh_src=6c2d12b73us
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def getRegions(ip_addresses):
def isValidIP(ip):
parts = ip.split('.')
if len(parts) != 4:
return False
for part in parts:
if not part.isdigit():
return False
if not 0 <= int(part) <= 255:
return False
return True
def getRegion(ip):
first_octet = int(ip.split('.')[0])
if 0 <= first_octet <= 127:
return 1
elif 128 <= first_octet <= 191:
return 2
elif 192 <= first_octet <= 223:
return 3
elif 224 <= first_octet <= 239:
return 4
elif 240 <= first_octet <= 255:
return 5
else:
return -1
regions = []
for ip in ip_addresses:
if isValidIP(ip):
regions.append(getRegion(ip))
else:
regions.append(-1)
return regions
Location Detection
HPE โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Groww
Batch : 2023/2022 passouts
Role : Web Developer
Link : https://www.linkedin.com/jobs/view/4064817342
Batch : 2023/2022 passouts
Role : Web Developer
Link : https://www.linkedin.com/jobs/view/4064817342
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Swiggy
Role : Machine Learning Engineer 1
Batch : 2024/2023 passouts
Link :
https://www.linkedin.com/jobs/view/4064814309
Role : Machine Learning Engineer 1
Batch : 2024/2023 passouts
Link :
https://www.linkedin.com/jobs/view/4064814309
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Yext is hiring for Software Engineer - 2
Experience: 0 - 1 year's
Expected Salary: 12-24 LPA
Apply here: https://www.linkedin.com/jobs/view/4068837390/?alternateChannel=search
Experience: 0 - 1 year's
Expected Salary: 12-24 LPA
Apply here: https://www.linkedin.com/jobs/view/4068837390/?alternateChannel=search