int solve(int n,vector<int>diff,int lb,int up){
int x=diff[0],x1=INT_MIN,y=diff[0],y1=INT_MAX;
for(int i=1;i<n;i++){
x+=diff[i];
y +=diff[i];
x1=max(x1,x);
y1=min(y1,y);
}
int ans=0;
for(int h=lb;h<=up;h++)
{
if(h+y1>=lb && h+x1<=up)
ans++;
}
return ans;
}
Lower bound upper bound โ
Atlassian
int x=diff[0],x1=INT_MIN,y=diff[0],y1=INT_MAX;
for(int i=1;i<n;i++){
x+=diff[i];
y +=diff[i];
x1=max(x1,x);
y1=min(y1,y);
}
int ans=0;
for(int h=lb;h<=up;h++)
{
if(h+y1>=lb && h+x1<=up)
ans++;
}
return ans;
}
Lower bound upper bound โ
Atlassian
๐1
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long power(long long x,
long long y,
const int& MOD)
{
long long res = 1;
while (y > 0) {
if (y & 1)
res = (res * x) % MOD;
x = (x * x) % MOD;
y /= 2;
}
return res;
}
long long countGraphs(int n)
{
long long x = n * (n - 1) / 2;
return power(2, x, MOD);
}
int main()
{
int n;
cout << countGraphs(n);
return 0;
}
Vertices โ
using namespace std;
const int MOD = 1e9 + 7;
long long power(long long x,
long long y,
const int& MOD)
{
long long res = 1;
while (y > 0) {
if (y & 1)
res = (res * x) % MOD;
x = (x * x) % MOD;
y /= 2;
}
return res;
}
long long countGraphs(int n)
{
long long x = n * (n - 1) / 2;
return power(2, x, MOD);
}
int main()
{
int n;
cout << countGraphs(n);
return 0;
}
Vertices โ
int minTime(std::vector<int> processorTime, std::vector<int> taskTime) {
std::sort(processorTime.begin(), processorTime.end());
std::sort(taskTime.begin(), taskTime.end(), std::greater<int>());
int maxTime = 0;
for(int i = 0; i < processorTime.size(); i++){
processorTime[i] += taskTime[i*4];
maxTime = std::max(maxTime, processorTime[i]);
}
return maxTime;
}
Minimum Process Timing
Ceilego ( C++โ )
std::sort(processorTime.begin(), processorTime.end());
std::sort(taskTime.begin(), taskTime.end(), std::greater<int>());
int maxTime = 0;
for(int i = 0; i < processorTime.size(); i++){
processorTime[i] += taskTime[i*4];
maxTime = std::max(maxTime, processorTime[i]);
}
return maxTime;
}
Minimum Process Timing
Ceilego ( C++โ )
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Please find latest Opportunities from Career page and Apply before Expired before applying kindly follow jobs description and eligibility carefully
passout year: 2023, 2022, 2021, 2020, 2019, 2018
Join us
Moody Hiring Associate Software Engineer
Salary: 12lpa - 14lpa
Apply now: https://careers.moodys.com/job/18815826/associate-software-engineer-bangalore-in/
IDFC First bank Hiring Data Scientist
Salary: 14 lpa ( Expected)
Apply now: https://ekjx.fa.em2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/requisitions/preview/105955
Zoha Hiring Software Developer
Salary: 8lpa - 10lpa
Apply now; https://www.zoho.com/careers/jobdetails/?job_id=2803000614929615
Elevates Hiring Associate QA
Apply now : https://careers3-elevateservices.icims.com/jobs/2632/associate-qa/job
NTT Hiring Graduate Engineer trainee
Apply now: https://careers.services.global.ntt/global/en/job/NTT1GLOBALR101060EXTERNALENGLOBAL/Graduate-Trainee-Engineer
Airtel Hiring Data Analyst
Apply now: https://eeji.fa.em3.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/job/117879/
Baker Hughes Hiring Trainee
Salary: 3.5 lpa - 4.5 lpa
Apply now: https://careers.bakerhughes.com/global/en/job/BAHUGLOBALR90963/Early-Career-Trainee
Oracle Hiring Software Developer
Salary: 14 lpa ( Expected)
Apply now: https://eeho.fa.us2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/jobsearch/requisitions/preview/204012/?keyword=Software+Developer
passout year: 2023, 2022, 2021, 2020, 2019, 2018
Join us
Moody Hiring Associate Software Engineer
Salary: 12lpa - 14lpa
Apply now: https://careers.moodys.com/job/18815826/associate-software-engineer-bangalore-in/
IDFC First bank Hiring Data Scientist
Salary: 14 lpa ( Expected)
Apply now: https://ekjx.fa.em2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/requisitions/preview/105955
Zoha Hiring Software Developer
Salary: 8lpa - 10lpa
Apply now; https://www.zoho.com/careers/jobdetails/?job_id=2803000614929615
Elevates Hiring Associate QA
Apply now : https://careers3-elevateservices.icims.com/jobs/2632/associate-qa/job
NTT Hiring Graduate Engineer trainee
Apply now: https://careers.services.global.ntt/global/en/job/NTT1GLOBALR101060EXTERNALENGLOBAL/Graduate-Trainee-Engineer
Airtel Hiring Data Analyst
Apply now: https://eeji.fa.em3.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/job/117879/
Baker Hughes Hiring Trainee
Salary: 3.5 lpa - 4.5 lpa
Apply now: https://careers.bakerhughes.com/global/en/job/BAHUGLOBALR90963/Early-Career-Trainee
Oracle Hiring Software Developer
Salary: 14 lpa ( Expected)
Apply now: https://eeho.fa.us2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/jobsearch/requisitions/preview/204012/?keyword=Software+Developer
Python 3โ
Validate a cricket match over
Validate a cricket match over
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include<bits/stdc++.h>
using namespace std;
struct Node {
int data;
struct Node* left;
struct Node* right;
};
struct Node* newNode(int data) {
struct Node* node = new Node;
node->data = data;
node->left = NULL;
node->right = NULL;
return(node);
}
void convertTreeToItsMirror(struct Node* node) {
if (node == NULL) {
return;
} else {
struct Node* temp;
convertTreeToItsMirror(node->left);
convertTreeToItsMirror(node->right);
temp = node->left;
node->left = node->right;
node->right = temp;
}
}
void printTree(struct Node* node) {
if (node == NULL) {
return;
}
printTree(node->left);
cout << node->data << " ";
printTree(node->right);
}
int main() {
struct Node *root = newNode(1);
root->left = newNode(2);
root->right = newNode(3);
root->left->left = newNode(4);
root->left->right = newNode(5);
cout << "Tree: ";
printTree(root);
cout << endl;
convertTreeToItsMirror(root);
cout << "Mirror of the Tree: ";
printTree(root);
cout << endl;
return 0;
}
Generate mirror of Binary Tree C++โ
using namespace std;
struct Node {
int data;
struct Node* left;
struct Node* right;
};
struct Node* newNode(int data) {
struct Node* node = new Node;
node->data = data;
node->left = NULL;
node->right = NULL;
return(node);
}
void convertTreeToItsMirror(struct Node* node) {
if (node == NULL) {
return;
} else {
struct Node* temp;
convertTreeToItsMirror(node->left);
convertTreeToItsMirror(node->right);
temp = node->left;
node->left = node->right;
node->right = temp;
}
}
void printTree(struct Node* node) {
if (node == NULL) {
return;
}
printTree(node->left);
cout << node->data << " ";
printTree(node->right);
}
int main() {
struct Node *root = newNode(1);
root->left = newNode(2);
root->right = newNode(3);
root->left->left = newNode(4);
root->left->right = newNode(5);
cout << "Tree: ";
printTree(root);
cout << endl;
convertTreeToItsMirror(root);
cout << "Mirror of the Tree: ";
printTree(root);
cout << endl;
return 0;
}
Generate mirror of Binary Tree C++โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Zeta SDE Internship Application
Batch : 2023
https://docs.google.com/forms/d/e/1FAIpQLSeeMz9_1pG50DCGtIdY4Nnopf_DCRNHgqa_8jz7ByRoNibkbQ/viewform
Batch : 2023
https://docs.google.com/forms/d/e/1FAIpQLSeeMz9_1pG50DCGtIdY4Nnopf_DCRNHgqa_8jz7ByRoNibkbQ/viewform
vector<long long> solve(vector<int> &A, vector<vector<int>> &B) {
int n = A.size();
vector<long long> result;
for (auto &query : B) {
int rdx= query[0];
int l = query[1] - 1;
int r = query[2] - 1;
int v = query[3];
if (rdx == 1) {
for (int i = l; i <= r; ++i) {
A[i] = v;
}
} else if (rdx == 2) {
for (int i = l; i <= r; ++i) {
A[i] |= v;
}
} else if (rdx == 3) {
long long ans = 0;
for (int len = 1; len <= r - l + 1; ++len) {
for (int i = l; i + len <= r + 1; ++i) {
long long subarray_and = A[i];
for (int j = i + 1; j < i + len; ++j) {
subarray_and &= A[j];
}
ans += subarray_and;
}
}
result.push_back(ans);
}
}
return result;
}
1st
Trilogy โ
int n = A.size();
vector<long long> result;
for (auto &query : B) {
int rdx= query[0];
int l = query[1] - 1;
int r = query[2] - 1;
int v = query[3];
if (rdx == 1) {
for (int i = l; i <= r; ++i) {
A[i] = v;
}
} else if (rdx == 2) {
for (int i = l; i <= r; ++i) {
A[i] |= v;
}
} else if (rdx == 3) {
long long ans = 0;
for (int len = 1; len <= r - l + 1; ++len) {
for (int i = l; i + len <= r + 1; ++i) {
long long subarray_and = A[i];
for (int j = i + 1; j < i + len; ++j) {
subarray_and &= A[j];
}
ans += subarray_and;
}
}
result.push_back(ans);
}
}
return result;
}
1st
Trilogy โ
int inf = 2e9;
vector<int> solution(int a, vector<vector<int>>& B) {
int m = B.size();
vector<int> ans(a + 1, -1);
vector<int> done(m);
for (auto x : B) ans[x[1]] = m + 1;
for (int i = 1; i <= a; i++) {
if (ans[i] == m + 1) continue;
int curr = inf, taken = -1;
for (int j = 0; j < m; j++) {
int start = i;
int days = 0, comp = -1;
int l = 0;
while (start < a + 1) {
if (ans[start] == m + 1) {
start++;
continue;
}
days++, start++;
if (days == B[j][2]) {
l = 1;
comp = start - 1;
break;
}
}
if (!done[j] and B[j][0] <= i and comp < B[j][1] and l) {
if (B[j][1] < curr) {
curr = B[j][1], taken = j;
}
}
}
if (taken == -1) {
ans[i] = 0;
continue;
}
B[taken][2]--;
ans[i] = taken + 1;
if (!B[taken][2]) done[taken] = 1;
}
int d = 0;
for (auto x : done)
if (!x) d = 1;
if (d) {
vector<int> ret(1, -1);
return ret;
} else
return ans;
}
2nd
Trilogy โ
vector<int> solution(int a, vector<vector<int>>& B) {
int m = B.size();
vector<int> ans(a + 1, -1);
vector<int> done(m);
for (auto x : B) ans[x[1]] = m + 1;
for (int i = 1; i <= a; i++) {
if (ans[i] == m + 1) continue;
int curr = inf, taken = -1;
for (int j = 0; j < m; j++) {
int start = i;
int days = 0, comp = -1;
int l = 0;
while (start < a + 1) {
if (ans[start] == m + 1) {
start++;
continue;
}
days++, start++;
if (days == B[j][2]) {
l = 1;
comp = start - 1;
break;
}
}
if (!done[j] and B[j][0] <= i and comp < B[j][1] and l) {
if (B[j][1] < curr) {
curr = B[j][1], taken = j;
}
}
}
if (taken == -1) {
ans[i] = 0;
continue;
}
B[taken][2]--;
ans[i] = taken + 1;
if (!B[taken][2]) done[taken] = 1;
}
int d = 0;
for (auto x : done)
if (!x) d = 1;
if (d) {
vector<int> ret(1, -1);
return ret;
} else
return ans;
}
2nd
Trilogy โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
ABB hiring Software Engineer
Year of experience - 0-2 years
Salary - 16 LPA - 28 LPA
Apply - https://tinyurl.com/ABBhiringSDE
Year of experience - 0-2 years
Salary - 16 LPA - 28 LPA
Apply - https://tinyurl.com/ABBhiringSDE
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Standard chartered bank is hiring Data Analyst
https://scb.taleo.net/careersection/ex/jobdetail.ftl?job=2300013992&lang=en&src=JB-10881
https://scb.taleo.net/careersection/ex/jobdetail.ftl?job=2300013992&lang=en&src=JB-10881
scb.taleo.net
Data Analyst, Risk Data Strategy
Click the link provided to see the complete job description.
โค1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: EduMetrix Learning Solution
Role: Software Engineer Intern
Batch eligible: 2023 and 2024 grads
Duration: 6 months
Stipend: 20k per months
Location: Bangalore
Apply: https://www.linkedin.com/jobs/view/3683623779
Role: Software Engineer Intern
Batch eligible: 2023 and 2024 grads
Duration: 6 months
Stipend: 20k per months
Location: Bangalore
Apply: https://www.linkedin.com/jobs/view/3683623779
Linkedin
25 Software Engineer Intern jobs in India
Todayโs top 25 Software Engineer Intern jobs in India. Leverage your professional network, and get hired. New Software Engineer Intern jobs added daily.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐ฑ2
Max separations โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
You must have heard news or seen that people are using AI to create nude images of womens.
Please read this post if anything goes wrong in future with you or with someone you know.
Share with your friends for awareness.
Link : https://www.linkedin.com/feed/update/urn:li:activity:7094119643962880000
P.S : This is not job post but people must be aware like whatโs going on over internet and how to tackle if anything wrong happens to you or your loved ones.
Please read this post if anything goes wrong in future with you or with someone you know.
Share with your friends for awareness.
Link : https://www.linkedin.com/feed/update/urn:li:activity:7094119643962880000
P.S : This is not job post but people must be aware like whatโs going on over internet and how to tackle if anything wrong happens to you or your loved ones.
Linkedin
"If someone edits your photo with AI or Photoshop to create a nude photo, then you go to https://www.stopncii.org/ and submit theโฆ
"If someone edits your photo with AI or Photoshop to create a nude photo, then you go to https://www.stopncii.org/ and submit the original photo and the edited photo, then they will remove the edited photo from all the places on the Internet. You don't needโฆ
โค2
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Rupeek is hiring Program Management Interns who can join IMMEDIATELY for their Category - Business team.
Eligibility: - Graduating from BTech/BE, MBA 2023/2024 or CAs
- Available to start-off the internship immediately
- Willing to relocate and work from office (Based out of Bangalore)
Apply Link :
https://docs.google.com/forms/d/e/1FAIpQLSf_5J6u_CCKyIIoW7D9mVvHyB9usvGAliYwymqKgbEPnDHU6A/viewform
- Available for 6month full-time internship
Job Description:
https://docs.google.com/document/u/0/d/1UX-RpJshYbQBaRYmzpeywrRXhm9XloMJgUvzeudNBOs/mobilebasic
Eligibility: - Graduating from BTech/BE, MBA 2023/2024 or CAs
- Available to start-off the internship immediately
- Willing to relocate and work from office (Based out of Bangalore)
Apply Link :
https://docs.google.com/forms/d/e/1FAIpQLSf_5J6u_CCKyIIoW7D9mVvHyB9usvGAliYwymqKgbEPnDHU6A/viewform
- Available for 6month full-time internship
Job Description:
https://docs.google.com/document/u/0/d/1UX-RpJshYbQBaRYmzpeywrRXhm9XloMJgUvzeudNBOs/mobilebasic
Create Hierarchial graph from nodes
Seclore โ
Seclore โ
๐2