#include <iostream>
#include <vector>
using namespace std;
int fun(int n) {
int total = 0;
while (n > 0) {
total += n % 10;
n /= 10;
}
return total;
}
int solve(int N) {
int total_sum = 0;
vector<int> elements;
for (int i = 1; i <= N; ++i) {
elements.push_back(i);
}
fun(N);
while (elements.size() > 1) {
vector<int> new_elements;
for (size_t index = 0; index < elements.size(); ++index) {
int value = elements[index];
if (index % 2 == 1) {
new_elements.push_back(value);
} else {
total_sum += value;
}
}
elements = new_elements;
}
return total_sum;
}
Range Game โ
#include <vector>
using namespace std;
int fun(int n) {
int total = 0;
while (n > 0) {
total += n % 10;
n /= 10;
}
return total;
}
int solve(int N) {
int total_sum = 0;
vector<int> elements;
for (int i = 1; i <= N; ++i) {
elements.push_back(i);
}
fun(N);
while (elements.size() > 1) {
vector<int> new_elements;
for (size_t index = 0; index < elements.size(); ++index) {
int value = elements[index];
if (index % 2 == 1) {
new_elements.push_back(value);
} else {
total_sum += value;
}
}
elements = new_elements;
}
return total_sum;
}
Range Game โ
โค1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Anil Kumar on LinkedIn: #hiring #datascience #internship #careeropportunity #joinus | 10 comments
๐ Exciting Opportunity Alert! Join Our Team as a Data Science Intern! ๐
We're thrilled to announce that we're expanding our team and looking for a passionateโฆ | 10 comments on LinkedIn
We're thrilled to announce that we're expanding our team and looking for a passionateโฆ | 10 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Sarath Chandar Sukumar on LinkedIn: Vaken Technologies Home - VAKEN TECHNOLOGIES
๐ Weโre Hiring! ๐
Join the #Vaken family and be a part of something transformative! ๐
Weโre looking for passionate individuals to join our team as weโฆ
Join the #Vaken family and be a part of something transformative! ๐
Weโre looking for passionate individuals to join our team as weโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
MasterCard hiring Data Engineers
Freshers eligible
Apply Here : https://mastercard.wd1.myworkdayjobs.com/CorporateCareers/job/Pune-India/Data-Engineer-II_R-212415
Freshers eligible
Apply Here : https://mastercard.wd1.myworkdayjobs.com/CorporateCareers/job/Pune-India/Data-Engineer-II_R-212415
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Eurofins hiring Associate Software Engineer
0-1 year experience
6-12 LPA CTC
Apply Here : https://jobs.smartrecruiters.com/Eurofins/744000018924766-associate-software-engineer-sharepoint
0-1 year experience
6-12 LPA CTC
Apply Here : https://jobs.smartrecruiters.com/Eurofins/744000018924766-associate-software-engineer-sharepoint
Eurofins
Eurofins is looking for a Associate Software Engineer - Sharepoint in Bengaluru, Karnataka, India
POSITION TITLE: Associate Software Engineer:REPORTING TO: โCollaborative Platforms and IT Toolsโ ManagerWORKING LOCATION: Bangalore, IndiaOBJECTIVE: Eurofins Collaborative Platforms and IT Tools T...
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
int n;
void dfs(int i, int j, vector<string>& highways, vector<vector<bool>>& visited) {
if (i < 0 || i > 1 || j < 0 || j >= n || highways[i][j] == 'x' || visited[i][j])
return;
visited[i][j] = true;
dfs(i, j + 1, highways, visited);
dfs(i, j - 1, highways, visited);
dfs(1 - i, j, highways, visited);
}
int countComponents(vector<string>& highways) {
vector<vector<bool>> visited(2, vector<bool>(n, false));
int components = 0;
for (int i = 0; i < 2; ++i) {
for (int j = 0; j < n; ++j) {
if (!visited[i][j] && highways[i][j] == 'o') {
components++;
dfs(i, j, highways, visited);
}
}
}
return components;
}
int main() {
cin >> n;
vector<string> highways(2);
cin >> highways[0] >> highways[1];
int initialComponents = countComponents(highways);
if (initialComponents >= 3) {
cout << 0 << endl;
return 0;
}
int criticalSegments = 0;
for (int i = 0; i < 2; ++i) {
for (int j = 0; j < n; ++j) {
if (highways[i][j] == 'o') {
highways[i][j] = 'x';
int newComponents = countComponents(highways);
if (newComponents == 3) {
criticalSegments++;
}
highways[i][j] = 'o';
}
}
}
cout << criticalSegments << endl;
return 0;
}
Road Network Breakdown โ
Juspay
๐1
string largestMagical(string binString) {
if (binString.empty()) return binString;
vector<string> ans;
int cnt = 0, j = 0;
for (int i = 0; i < binString.size(); ++i) {
cnt += binString[i] == '1' ? 1 : -1;
if (cnt == 0) {
ans.push_back("1" + largestMagical(binString.substr(j + 1, i - j - 1)) + "0");
j = i + 1;
}
}
sort(ans.begin(), ans.end(), greater<string>());
return accumulate(ans.begin(), ans.end(), string{});
}
Nvidia โ
if (binString.empty()) return binString;
vector<string> ans;
int cnt = 0, j = 0;
for (int i = 0; i < binString.size(); ++i) {
cnt += binString[i] == '1' ? 1 : -1;
if (cnt == 0) {
ans.push_back("1" + largestMagical(binString.substr(j + 1, i - j - 1)) + "0");
j = i + 1;
}
}
sort(ans.begin(), ans.end(), greater<string>());
return accumulate(ans.begin(), ans.end(), string{});
}
Nvidia โ
๐2
#include <stdio.h>
#include <regex.h>
int isPowerOfTwo(const char *binaryString) {
regex_t regex;
int result;
result = regcomp(®ex, "^0*10*$", REG_EXTENDED);
if (result) {
printf("Could not compile regex\n");
return 0;
}
result = regexec(®ex, binaryString, 0, NULL, 0);
regfree(®ex);
if (!result) {
return 1;
} else {
return 0;
}
}
int main() {
int t;
char binaryString[1000];
scanf("%d", &t);
while (t--) {
scanf("%s", binaryString);
if (isPowerOfTwo(binaryString)) {
printf("True\n");
} else {
printf("False\n");
}
}
return 0;
}
Nvidia (Regex) โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Fijutsu is hiring for Apprentice
Exp : 2021/2022/2023/2024 batch passouts eligible
Apply Link : https://fujitsu.ripplehire.com/candidate/?token=xiOa3DUEJx25jui4MO8X&lang=en&source=LINKEDIN&ref=LI02
Exp : 2021/2022/2023/2024 batch passouts eligible
Apply Link : https://fujitsu.ripplehire.com/candidate/?token=xiOa3DUEJx25jui4MO8X&lang=en&source=LINKEDIN&ref=LI02
Ripplehire
Fujitsu Careers | Latest jobs at Fujitsu - Ripplehire.com
Apply Now! This is a wonderful opportunity. Help your friends by sharing this role with them.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐ANSR is hiring for Software Engineer I (0-2 years)
Experience: 0 - 1 year's
Expected Salary: 5-12 LPA
Apply here: https://www.linkedin.com/jobs/view/3996276754/?alternateChannel=search
๐Irdeto is hiring for Software Engineer
Experience: 0 - 1 year's
Expected Salary: 8-12 LPA
Apply here: https://careers.irdeto.com/job/Noida-Software-Engineer/1213761400/
๐Medpace is hiring for Entry Level Software Engineer
Experience: 0 - 1 year's
Expected Salary: 5-12 LPA
Apply here: https://careers.medpace.com/jobs/9986?lang=en-us&iis=Job+Board&iisn=LinkedIn
Experience: 0 - 1 year's
Expected Salary: 5-12 LPA
Apply here: https://www.linkedin.com/jobs/view/3996276754/?alternateChannel=search
๐Irdeto is hiring for Software Engineer
Experience: 0 - 1 year's
Expected Salary: 8-12 LPA
Apply here: https://careers.irdeto.com/job/Noida-Software-Engineer/1213761400/
๐Medpace is hiring for Entry Level Software Engineer
Experience: 0 - 1 year's
Expected Salary: 5-12 LPA
Apply here: https://careers.medpace.com/jobs/9986?lang=en-us&iis=Job+Board&iisn=LinkedIn
Linkedin
ANSR hiring Software Engineer I [T500-13313] in Bengaluru, Karnataka, India | LinkedIn
Posted 6:48:57 AM. Position Responsibilities:Gather user requirements from manufacturing and engineering teams for newโฆSee this and similar jobs on LinkedIn.
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>using namespace std;
struct Person {
string name;
int age;
string city;
int salary;
};
int countAgeMoreThanK(const vector<Person> &people, int k) {
int count = 0;
for(const auto &person : people) {
if(person.age > k) {
count++;
}
}
return count;
}
int countPersonsFromCity(const vector<Person> &people, const string &c) {
int count = 0;
for(const auto &person : people) {
if(person.city == c) {
count++;
}
}
return count;
}
int countSalaryBetween(const vector<Person> &people, int min_sal, int max_sal) {
int count = 0;
for(const auto &person : people) {
if(person.salary >= min_sal && person.salary <= max_sal) {
count++;
}
}
return count;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int n, q;
cin >> n >> q;
vector<Person> people(n);
for(int i = 0; i < n; ++i){
cin >> people[i].name >> people[i].age >> people[i].city >> people[i].salary;
}
while(q--){
int type;
cin >> type;
if(type == 1){
int k;
cin >> k;
int result = countAgeMoreThanK(people, k);
cout << result << "\n";
}
else if(type == 2){
string c;
cin >> c;
int result = countPersonsFromCity(people, c);
cout << result << "\n";
}
else if(type == 3){
int min_sal, max_sal;
cin >> min_sal >> max_sal;
int result = countSalaryBetween(people, min_sal, max_sal);
cout << result << "\n";
}
}
return 0;
}
Country survey โ
Amdocs