vector<int> BobnBot(int N, int M, vector<vector<int>> games, int Q, vector<vector<int>> queries) {
vector<int> result;
for (const auto& query : queries) {
vector<int> cleaned_query;
for (int num : query) {
if (num != -1) {
cleaned_query.push_back(num);
} else {
break;
}
}
int match_count = 0;
for (const auto& game : games) {
bool match = true;
for (size_t i = 0; i < cleaned_query.size(); ++i) {
if (game[i] != cleaned_query[i]) {
match = false;
break;
}
}
if (match) {
++match_count;
}
}
result.push_back(match_count);
}
return result;
}
The bot and the game โ
vector<int> result;
for (const auto& query : queries) {
vector<int> cleaned_query;
for (int num : query) {
if (num != -1) {
cleaned_query.push_back(num);
} else {
break;
}
}
int match_count = 0;
for (const auto& game : games) {
bool match = true;
for (size_t i = 0; i < cleaned_query.size(); ++i) {
if (game[i] != cleaned_query[i]) {
match = false;
break;
}
}
if (match) {
++match_count;
}
}
result.push_back(match_count);
}
return result;
}
The bot and the game โ
๐1
vector<string> areAlmostEquivalent(vector<string>& s, vector<string>& t) {
vector<string> result;
auto countCharacters = [](const string& str) {
vector<int> count(26, 0);
for (char c : str) {
count[c - 'a']++;
}
return count;
};
for (size_t i = 0; i < s.size(); ++i) {
const string& str_s = s[i];
const string& str_t = t[i];
vector<int> count_s = countCharacters(str_s);
vector<int> count_t = countCharacters(str_t);
bool isAlmostEquivalent = true;
for (int j = 0; j < 26; ++j) {
if (abs(count_s[j] - count_t[j]) > 3) {
isAlmostEquivalent = false;
break;
}
}
if (isAlmostEquivalent) {
result.push_back("YES");
} else {
result.push_back("NO");
}
}
return result;
}
Almost Equivalent strings โ
vector<string> result;
auto countCharacters = [](const string& str) {
vector<int> count(26, 0);
for (char c : str) {
count[c - 'a']++;
}
return count;
};
for (size_t i = 0; i < s.size(); ++i) {
const string& str_s = s[i];
const string& str_t = t[i];
vector<int> count_s = countCharacters(str_s);
vector<int> count_t = countCharacters(str_t);
bool isAlmostEquivalent = true;
for (int j = 0; j < 26; ++j) {
if (abs(count_s[j] - count_t[j]) > 3) {
isAlmostEquivalent = false;
break;
}
}
if (isAlmostEquivalent) {
result.push_back("YES");
} else {
result.push_back("NO");
}
}
return result;
}
Almost Equivalent strings โ
๐1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int minStones(vector<int>& xstart, vector<int>& xend) {
int n = xstart.size();
vector<pair<int, int>> intervals;
for (int i = 0; i < n; ++i) {
intervals.push_back({xend[i], xstart[i]});
}
sort(intervals.begin(), intervals.end());
int stones = 0;
int lastSmashed = -1;
for (const auto& interval : intervals) {
int start = interval.second;
int end = interval.first;
if (start > lastSmashed) {
stones++;
lastSmashed = end;
}
}
return stones;
}
#include <vector>
#include <algorithm>
using namespace std;
int minStones(vector<int>& xstart, vector<int>& xend) {
int n = xstart.size();
vector<pair<int, int>> intervals;
for (int i = 0; i < n; ++i) {
intervals.push_back({xend[i], xstart[i]});
}
sort(intervals.begin(), intervals.end());
int stones = 0;
int lastSmashed = -1;
for (const auto& interval : intervals) {
int start = interval.second;
int end = interval.first;
if (start > lastSmashed) {
stones++;
lastSmashed = end;
}
}
return stones;
}
๐1๐คฎ1
Forwarded from Amazon Exam Placement Group (Dushyant)
Forwarded from Amazon Exam Placement Group (Dushyant)
Amazon Exam Placement Group
Photo
vector<int> suitableLocations(vector<int>& center, long d) {
auto feasible = & {
long total = 0;
for (int point : center) {
total += abs(mid - point) * 2;
}
return total <= d;
};
auto binarySearchRight = & {
int low = start;
int high = end;
while (low <= high) {
int mid = low + (high - low) / 2;
if (feasible(mid)) {
low = mid + 1;
} else {
high = mid - 1;
}
}
return low - 1;
};
auto binarySearchLeft = & {
int low = start;
int high = end;
while (low <= high) {
int mid = low + (high - low) / 2;
if (feasible(mid)) {
high = mid - 1;
} else {
low = mid + 1;
}
}
return low;
};
vector<int> suitablePoints;
int rightLimit = binarySearchRight(0, *max_element(center.begin(), center.end()) + d);
int leftLimit = binarySearchLeft(*min_element(center.begin(), center.end()) - d, -1);
for (int i = leftLimit; i <= rightLimit; ++i) {
suitablePoints.push_back(i);
}
return suitablePoints;
}
Amazon โ
auto feasible = & {
long total = 0;
for (int point : center) {
total += abs(mid - point) * 2;
}
return total <= d;
};
auto binarySearchRight = & {
int low = start;
int high = end;
while (low <= high) {
int mid = low + (high - low) / 2;
if (feasible(mid)) {
low = mid + 1;
} else {
high = mid - 1;
}
}
return low - 1;
};
auto binarySearchLeft = & {
int low = start;
int high = end;
while (low <= high) {
int mid = low + (high - low) / 2;
if (feasible(mid)) {
high = mid - 1;
} else {
low = mid + 1;
}
}
return low;
};
vector<int> suitablePoints;
int rightLimit = binarySearchRight(0, *max_element(center.begin(), center.end()) + d);
int leftLimit = binarySearchLeft(*min_element(center.begin(), center.end()) - d, -1);
for (int i = leftLimit; i <= rightLimit; ++i) {
suitablePoints.push_back(i);
}
return suitablePoints;
}
Amazon โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Glean Hiring Salesforce Developer Intern:
Graduation Year: 2024 / 2025 / 2026
Eligibility: Enrolled in a Bachelor's or Master's degree program in Computer Science, Information Systems, Business Administration, or a related field.
Duration: 3 months
Location: Bangalore
Apply Link: https://boards.greenhouse.io/gleanwork/jobs/4427247005
Graduation Year: 2024 / 2025 / 2026
Eligibility: Enrolled in a Bachelor's or Master's degree program in Computer Science, Information Systems, Business Administration, or a related field.
Duration: 3 months
Location: Bangalore
Apply Link: https://boards.greenhouse.io/gleanwork/jobs/4427247005
job-boards.greenhouse.io
Glean
<h4><strong>About Glean:</strong></h4>
<p>Founded in 2019, Glean is an innovative AI-powered knowledge management platform designed to help organizations quickly find, organize, and share information across their teams. By integrating seamlessly with toolsโฆ
<p>Founded in 2019, Glean is an innovative AI-powered knowledge management platform designed to help organizations quickly find, organize, and share information across their teams. By integrating seamlessly with toolsโฆ
Forwarded from Amazon Exam Placement Group (Dushyant)
int totalDist(vector<int>& c, int x) {
int d = 0;
for (int i : c) d += 2 * abs(i - x);
return d;
}
int suitableLocations(vector<int>& c, long long d) {
sort(c.begin(), c.end());
auto td = & { return totalDist(c, x); };
int m = c.size() / 2, l = m, r = m;
while (td(l) <= d) l -= 1;
while (td(r) <= d) r += 1;
return max(0, r - l - 1);
}
Amazon โ
int d = 0;
for (int i : c) d += 2 * abs(i - x);
return d;
}
int suitableLocations(vector<int>& c, long long d) {
sort(c.begin(), c.end());
auto td = & { return totalDist(c, x); };
int m = c.size() / 2, l = m, r = m;
while (td(l) <= d) l -= 1;
while (td(r) <= d) r += 1;
return max(0, r - l - 1);
}
Amazon โ
long wt = 0, ct = 0;
for (int i = 0; i < N; i++) {
if (patients[i][0] > ct) {
ct = patients[i][0];
}
wt += ct + patients[i][1] - patients[i][0];
ct += patients[i][1];
}
return wt / N;
Doctor โ
for (int i = 0; i < N; i++) {
if (patients[i][0] > ct) {
ct = patients[i][0];
}
wt += ct + patients[i][1] - patients[i][0];
ct += patients[i][1];
}
return wt / N;
Doctor โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Urban Company
๐ Job Title: SDE 1
โ๐ป YOE: Freshers to 2 years experience
โก๏ธ Apply: https://www.linkedin.com/jobs/view/3942098649
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ
๐ Job Title: SDE 1
โ๐ป YOE: Freshers to 2 years experience
โก๏ธ Apply: https://www.linkedin.com/jobs/view/3942098649
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ
Linkedin
104,000+ Software Engineer jobs in India (6,521 new)
Todayโs top 104,000+ Software Engineer jobs in India. Leverage your professional network, and get hired. New Software Engineer jobs added daily.
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Homelane is hiring SDE Intern
For 2024, 2025, 2026 grads
https://homelanecareers.skillate.com/jobs/55021
For 2024, 2025, 2026 grads
https://homelanecareers.skillate.com/jobs/55021
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Swiggy | Software Engineer | 0-2 YoE
https://www.linkedin.com/posts/ram-kumar-308122173_hiring-associate-software-activity-7204147422023835648-kcS0
Form link from the post: https://docs.google.com/forms/d/1yRnfoOJKjdlvFjnoYXvnrVHlb8V-CbQLUu4P265qFeY/viewform
https://www.linkedin.com/posts/ram-kumar-308122173_hiring-associate-software-activity-7204147422023835648-kcS0
Form link from the post: https://docs.google.com/forms/d/1yRnfoOJKjdlvFjnoYXvnrVHlb8V-CbQLUu4P265qFeY/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Abstrabit Technologies is hiring Full Stack Engineer
For 2024, 2023, 2022 grads
Location - Remote
https://www.linkedin.com/jobs/view/3939475400
For 2024, 2023, 2022 grads
Location - Remote
https://www.linkedin.com/jobs/view/3939475400
Linkedin
Abstrabit Technologies hiring Full Stack Engineer (0 to 2 Years) - Remote in India | LinkedIn
Posted 1:23:50 PM. Company DescriptionAbstrabit is a Bengaluru based software development company focused on scalingโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Amazon is hiring Freshers!
Position: Business Analyst Intern
Qualification: Bachelor's/ Masterโs Degree
Salary: Up to 8 LPA (Expected)
Experienc๏ปฟe: Freshers
Location: Bangalore, India
๐Apply Link: https://www.amazon.jobs/en/jobs/2662463/business-analyst-intern-row-sharp-team?cmpid=DA_INAD200785B
Position: Business Analyst Intern
Qualification: Bachelor's/ Masterโs Degree
Salary: Up to 8 LPA (Expected)
Experienc๏ปฟe: Freshers
Location: Bangalore, India
๐Apply Link: https://www.amazon.jobs/en/jobs/2662463/business-analyst-intern-row-sharp-team?cmpid=DA_INAD200785B
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://tatatechnologies.ripplehire.com/candidate/?token=FhhbYCnaWz3KYmeysFdD&lang=en&ref=LI01#apply/job/588227
*Fresher opening*
*Fresher opening*
Ripplehire
Tata Technologies Careers | Latest jobs at Tata Technologies - 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)
Hexaview Technologies Inc. hiring for QA (Freshers ) for
Noida location.
Send cv at ghulam.kashif@hexaviewtech.com (Sub: QA Fresher)
Position:-Software Quality Engineer (Fresher)
Location:- Noida
Eligibility Criteria - B. Tech/MCA/M.Tech -2021/2022
Job Description :
Software Quality Engineer Role:
Requirement:
Oops concepts
Testing understanding
Web and mobile testing concepts
SQL
Coding
Analytical skills
Communication
Attitude
Develop comprehensive test plans, test cases, and test scripts
based on software requirements and design documents.
Execute test cases and record test results, ensuring adherence
to established quality standards.
Collaborate with cross-functional teams, including developers,
product managers, and stakeholders, to understand project
requirements and drive quality improvements.
Conduct performance, scalability, and security testing to ensure
software stability and compliance.
Continuously improve testing processes and methodologies to
increase efficiency and effectiveness.
Noida location.
Send cv at ghulam.kashif@hexaviewtech.com (Sub: QA Fresher)
Position:-Software Quality Engineer (Fresher)
Location:- Noida
Eligibility Criteria - B. Tech/MCA/M.Tech -2021/2022
Job Description :
Software Quality Engineer Role:
Requirement:
Oops concepts
Testing understanding
Web and mobile testing concepts
SQL
Coding
Analytical skills
Communication
Attitude
Develop comprehensive test plans, test cases, and test scripts
based on software requirements and design documents.
Execute test cases and record test results, ensuring adherence
to established quality standards.
Collaborate with cross-functional teams, including developers,
product managers, and stakeholders, to understand project
requirements and drive quality improvements.
Conduct performance, scalability, and security testing to ensure
software stability and compliance.
Continuously improve testing processes and methodologies to
increase efficiency and effectiveness.
๐1