Repeat Stringโ
Python 3
Python 3
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
class UnionFind {
public:
vector<int> parent, rank;
UnionFind(int n) {
parent.resize(n);
rank.resize(n, 0);
for (int i = 0; i < n; ++i) {
parent[i] = i;
}
}
int find(int x) {
if (parent[x] != x) {
parent[x] = find(parent[x]);
}
return parent[x];
}
void unite(int x, int y) {
int rootX = find(x);
int rootY = find(y);
if (rootX != rootY) {
if (rank[rootX] > rank[rootY]) {
parent[rootY] = rootX;
} else if (rank[rootX] < rank[rootY]) {
parent[rootX] = rootY;
} else {
parent[rootY] = rootX;
rank[rootX]++;
}
}
}
};
int minTimeToCollectPlates(vector<int>& x, vector<int>& y, int d) {
int n = x.size();
UnionFind uf(n);
unordered_map<int, vector<int>> xMap, yMap;
for (int i = 0; i < n; ++i) {
xMap[x[i]].push_back(i);
yMap[y[i]].push_back(i);
}
for (const auto& [coord, indices] : xMap) {
for (int i = 1; i < indices.size(); ++i) {
if (abs(y[indices[i]] - y[indices[i - 1]]) <= d) {
uf.unite(indices[i], indices[i - 1]);
}
}
}
for (const auto& [coord, indices] : yMap) {
for (int i = 1; i < indices.size(); ++i) {
if (abs(x[indices[i]] - x[indices[i - 1]]) <= d) {
uf.unite(indices[i], indices[i - 1]);
}
}
}
unordered_set<int> unique;
for (int i = 0; i < n; ++i) {
unique.insert(uf.find(i));
}
return unique.size();
}
Gamekraft โ
public:
vector<int> parent, rank;
UnionFind(int n) {
parent.resize(n);
rank.resize(n, 0);
for (int i = 0; i < n; ++i) {
parent[i] = i;
}
}
int find(int x) {
if (parent[x] != x) {
parent[x] = find(parent[x]);
}
return parent[x];
}
void unite(int x, int y) {
int rootX = find(x);
int rootY = find(y);
if (rootX != rootY) {
if (rank[rootX] > rank[rootY]) {
parent[rootY] = rootX;
} else if (rank[rootX] < rank[rootY]) {
parent[rootX] = rootY;
} else {
parent[rootY] = rootX;
rank[rootX]++;
}
}
}
};
int minTimeToCollectPlates(vector<int>& x, vector<int>& y, int d) {
int n = x.size();
UnionFind uf(n);
unordered_map<int, vector<int>> xMap, yMap;
for (int i = 0; i < n; ++i) {
xMap[x[i]].push_back(i);
yMap[y[i]].push_back(i);
}
for (const auto& [coord, indices] : xMap) {
for (int i = 1; i < indices.size(); ++i) {
if (abs(y[indices[i]] - y[indices[i - 1]]) <= d) {
uf.unite(indices[i], indices[i - 1]);
}
}
}
for (const auto& [coord, indices] : yMap) {
for (int i = 1; i < indices.size(); ++i) {
if (abs(x[indices[i]] - x[indices[i - 1]]) <= d) {
uf.unite(indices[i], indices[i - 1]);
}
}
}
unordered_set<int> unique;
for (int i = 0; i < n; ++i) {
unique.insert(uf.find(i));
}
return unique.size();
}
Gamekraft โ
Even sum code
class UserMainCode(object):
@classmethod
def evenSum(cls, input1: int) -> int:
total_sum = 0
for i in range(2, input1 + 1, 2):
total_sum += i
return total_sum
Even sum code
Accenture โ
class UserMainCode(object):
@classmethod
def evenSum(cls, input1: int) -> int:
total_sum = 0
for i in range(2, input1 + 1, 2):
total_sum += i
return total_sum
Even sum code
Accenture โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
DNCL Technologies is hiring โค๏ธโค๏ธโค๏ธ
Role-: Embedded Hardware / Software
Passout: Before 2023
Qual-: B.Tech
Immediate Joiners Needed..
Date of Interview: 12.08.2024
Venue: No.441, 3rd Floor, 9th Main, AECS B Block, Singasandra, Banagalore- 560068
Role-: Embedded Hardware / Software
Passout: Before 2023
Qual-: B.Tech
Immediate Joiners Needed..
Date of Interview: 12.08.2024
Venue: No.441, 3rd Floor, 9th Main, AECS B Block, Singasandra, Banagalore- 560068
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Bentley is hiring Associate Software Engineer
For 2022, 2023, 2024 grads
Location: Pune
https://jobs.bentley.com/job/Pune-Associate-Software-Engineer/1178373400/?s=08
For 2022, 2023, 2024 grads
Location: Pune
https://jobs.bentley.com/job/Pune-Associate-Software-Engineer/1178373400/?s=08
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Hi ๐ I'm hiring. | Dharmesh BA ๐ต๐ฝโโ๏ธ
Hi ๐ I'm hiring. Building something exciting.
Apply here
https://tally.so/r/nPl65B | 17 comments on LinkedIn
Apply here
https://tally.so/r/nPl65B | 17 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
CloudSEK is hiring Frontend Engineer Intern
For 2024, 2025, 2026 grads
Location: Bangalore
https://www.cloudsek.com/openings?gh_jid=4435378004
For 2024, 2025, 2026 grads
Location: Bangalore
https://www.cloudsek.com/openings?gh_jid=4435378004
Cloudsek
Openings
Be part of something special. Join CloudSEK and explore a career in cybersecurity. We are passionate about protecting top class organisations.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Wissen Technology is hiring Java freshers [ 2024 Batch ]
Criteria: CGPA: 7.5 and above, no backlogs
Branch is CS, IT or similar with B.Tech, B.E, Mtech or programs.
Email: trupthi.shetty@wissen.com, abhay.tripathi@wissen.com
Criteria: CGPA: 7.5 and above, no backlogs
Branch is CS, IT or similar with B.Tech, B.E, Mtech or programs.
Email: trupthi.shetty@wissen.com, abhay.tripathi@wissen.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
We have opened applications for Dr. | Srijan Singh
We have opened applications for Dr. Kalam Fellowship 2024-25.
Interested candidates may please apply before 15th August 2024.
Job Description: Kalam Fellowship Program
Title: Kalam Fellow
Location: Delhi/Noida (Full time and From office location only)
Duration:โฆ
Interested candidates may please apply before 15th August 2024.
Job Description: Kalam Fellowship Program
Title: Kalam Fellow
Location: Delhi/Noida (Full time and From office location only)
Duration:โฆ
๐1
int solve(vector<int>& locs, int k) {UBS getminoperationsโ
int n = locs.size();
sort(locs.begin(), locs.end());
int ops = 0;
while (!locs.empty()) {
int tgt = locs.front();
ops++;
vector<int> newLocs;
for (int i = 1; i < locs.size(); ++i) {
int newLoc;
if (locs[i] > tgt) {
newLoc = locs[i] + k;
} else {
newLoc = locs[i] - k;
}
if (newLoc > 0) {
newLocs.push_back(newLoc);
}
}
locs = newLocs;
sort(locs.begin(), locs.end());
}
return ops;
}
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
using namespace std;
int countWays(int n, int k) {
vector<vector<int>> dp(n + 1, vector<int>(k + 1, 0));
vector<vector<int>> cumSum(n + 1, vector<int>(k + 1, 0));
for (int i = 1; i <= k; ++i) {
dp[1][i] = 1;
cumSum[1][i] = cumSum[1][i - 1] + dp[1][i];
}
for (int len = 2; len <= n; ++len) {
for (int j = 1; j <= k; ++j) {
dp[len][j] = cumSum[len - 1][j / 2];
cumSum[len][j] = cumSum[len][j - 1] + dp[len][j];
}
}
return cumSum[n][k];
}
Commvault โ
#include <vector>
using namespace std;
int countWays(int n, int k) {
vector<vector<int>> dp(n + 1, vector<int>(k + 1, 0));
vector<vector<int>> cumSum(n + 1, vector<int>(k + 1, 0));
for (int i = 1; i <= k; ++i) {
dp[1][i] = 1;
cumSum[1][i] = cumSum[1][i - 1] + dp[1][i];
}
for (int len = 2; len <= n; ++len) {
for (int j = 1; j <= k; ++j) {
dp[len][j] = cumSum[len - 1][j / 2];
cumSum[len][j] = cumSum[len][j - 1] + dp[len][j];
}
}
return cumSum[n][k];
}
Commvault โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Good for 1st and 2nd yr students
If you want to start Open Source Contribution, Here are 5 beginner friendly repos where you can start by solving issues:
- CodeTriage: A tool to help developers find open issues in GitHub repositories that need attention.
https://lnkd.in/gdxsNnds
- Tirith: A policy framework that scans declarative Infrastructure as Code (IaC) configurations.
https://lnkd.in/g9RW6pE5
- RealWorld: It is a full-stack example app that demonstrates various frameworks and libraries by building the same application, a medium clone.
https://lnkd.in/gxz6sXfS
- PublicLab: It is a community where people can come together to explore environmental concerns using DIY techniques.
https://lnkd.in/gNzvXN5N
- Oppia: It is an online learning platform that enables users to create and share interactive educational activities.
https://lnkd.in/gDgZds_n
If you want to start Open Source Contribution, Here are 5 beginner friendly repos where you can start by solving issues:
- CodeTriage: A tool to help developers find open issues in GitHub repositories that need attention.
https://lnkd.in/gdxsNnds
- Tirith: A policy framework that scans declarative Infrastructure as Code (IaC) configurations.
https://lnkd.in/g9RW6pE5
- RealWorld: It is a full-stack example app that demonstrates various frameworks and libraries by building the same application, a medium clone.
https://lnkd.in/gxz6sXfS
- PublicLab: It is a community where people can come together to explore environmental concerns using DIY techniques.
https://lnkd.in/gNzvXN5N
- Oppia: It is an online learning platform that enables users to create and share interactive educational activities.
https://lnkd.in/gDgZds_n
lnkd.in
LinkedIn
This link will take you to a page thatโs not on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
TalentCorp Hiring Graduate Trainee โค๏ธโค๏ธโค๏ธ
Qualifications: BAMS, Any Graduate, B.Arch , B.Tech/B.E. , BCA , B.B.A/ B.M.S , ITI Certification , B.Sc in , B.Com , B.El.Ed , B.Ed , B.Des. , Diploma , B.A.
Experience: 0 โ 3 years
Job Type: Full Time
Location: Pune
Skills/Requirements:
1. Ability to quickly learn and adjust to new tasks and environments.
2. Strong verbal and written communication to effectively interact with colleagues and supervisors.
3. Ability to assess information, solve problems, and make data-driven decisions.
4. Working collaboratively with others, contributing to team goals, and supporting peers.
Date of Interview: 10th August, 2024
Time : 8.30 AM โ 12.30 PM
Venue: TalentCorp Solutions Pvt Ltd Ground Floor, Soham Complex, Opposite Gajanan Hospital, Ranjangaon (Pune).
Qualifications: BAMS, Any Graduate, B.Arch , B.Tech/B.E. , BCA , B.B.A/ B.M.S , ITI Certification , B.Sc in , B.Com , B.El.Ed , B.Ed , B.Des. , Diploma , B.A.
Experience: 0 โ 3 years
Job Type: Full Time
Location: Pune
Skills/Requirements:
1. Ability to quickly learn and adjust to new tasks and environments.
2. Strong verbal and written communication to effectively interact with colleagues and supervisors.
3. Ability to assess information, solve problems, and make data-driven decisions.
4. Working collaboratively with others, contributing to team goals, and supporting peers.
Date of Interview: 10th August, 2024
Time : 8.30 AM โ 12.30 PM
Venue: TalentCorp Solutions Pvt Ltd Ground Floor, Soham Complex, Opposite Gajanan Hospital, Ranjangaon (Pune).