#include<bits/stdc++.h>
using namespace std;
int solve(string s, int k) {
int n = s.size();
int count[26] = {0};
int ml = 0;
int mc = 0;
int st = 0;
for (int e = 0; e < n; e++) {
count[s[e] - 'a']++;
mc = max(mc, count[s[e] - 'a']);
if ((e - st + 1) - mc > k) {
count[s[st] - 'a']--;
st++;
}
ml = max(ml, e - st + 1);
}
return ml+2;
}
C++โ
using namespace std;
int solve(string s, int k) {
int n = s.size();
int count[26] = {0};
int ml = 0;
int mc = 0;
int st = 0;
for (int e = 0; e < n; e++) {
count[s[e] - 'a']++;
mc = max(mc, count[s[e] - 'a']);
if ((e - st + 1) - mc > k) {
count[s[st] - 'a']--;
st++;
}
ml = max(ml, e - st + 1);
}
return ml+2;
}
C++โ
vector<int> solve(vector<int>& arr) {
int n = arr[1];
int m = arr[2];
vector<int> img(n * m);
for (int i = 0; i < n * m; i++) {
img[i] = arr[i + 3];
}
vector<int> v(m * n);
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
v[i * n + j] = img[(n - j - 1) * m + i];
}
}
return v;
}
Copy of fix camera issueโ
int n = arr[1];
int m = arr[2];
vector<int> img(n * m);
for (int i = 0; i < n * m; i++) {
img[i] = arr[i + 3];
}
vector<int> v(m * n);
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
v[i * n + j] = img[(n - j - 1) * m + i];
}
}
return v;
}
Copy of fix camera issueโ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
public static String solution(String[] paths) {
String[] simplified = new String[paths.length];
for (int i = 0; i < paths.length; i++) {
simplified[i] = simplify(paths[i]);
}
String result = "";
for (int i = 0; i < simplified.length; i++) {
if (i == 0) {
result = simplified[i];
} else {
result = commonSuffix(result, simplified[i]);
}
}
return result;
}
public static String simplify(String path) {
String[] parts = path.split("/");
Stack<String> stack = new Stack<>();
for (String part : parts) {
if (part.equals("..")) {
if (!stack.isEmpty()) {
stack.pop();
}
} else if (!part.equals(".")) {
stack.push(part);
}
}
StringBuilder sb = new StringBuilder();
for (String part : stack) {
sb.append("/");
sb.append(part);
}
return sb.toString();
}
public static String commonSuffix(String path1, String path2) {
String[] parts1 = path1.split("/");
String[] parts2 = path2.split("/");
int i = parts1.length - 1;
int j = parts2.length - 1;
while (i >= 0 && j >= 0 && parts1[i].equals(parts2[j])) {
i--;
j--;
}
StringBuilder sb = new StringBuilder();
for (int k = i + 1; k < parts1.length; k++) {
sb.append("/");
sb.append(parts1[k]);
}
return sb.toString();
String[] simplified = new String[paths.length];
for (int i = 0; i < paths.length; i++) {
simplified[i] = simplify(paths[i]);
}
String result = "";
for (int i = 0; i < simplified.length; i++) {
if (i == 0) {
result = simplified[i];
} else {
result = commonSuffix(result, simplified[i]);
}
}
return result;
}
public static String simplify(String path) {
String[] parts = path.split("/");
Stack<String> stack = new Stack<>();
for (String part : parts) {
if (part.equals("..")) {
if (!stack.isEmpty()) {
stack.pop();
}
} else if (!part.equals(".")) {
stack.push(part);
}
}
StringBuilder sb = new StringBuilder();
for (String part : stack) {
sb.append("/");
sb.append(part);
}
return sb.toString();
}
public static String commonSuffix(String path1, String path2) {
String[] parts1 = path1.split("/");
String[] parts2 = path2.split("/");
int i = parts1.length - 1;
int j = parts2.length - 1;
while (i >= 0 && j >= 0 && parts1[i].equals(parts2[j])) {
i--;
j--;
}
StringBuilder sb = new StringBuilder();
for (int k = i + 1; k < parts1.length; k++) {
sb.append("/");
sb.append(parts1[k]);
}
return sb.toString();
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Netcore is Hiring !!
Role: Backend Developer
Experience: 0-5 years
Location: Mumbai
https://assessment.hackerearth.com/challenges/new/hiring/netcore-backend-developer-hiring-challenge-december-2023-round-1/
Role: Backend Developer
Experience: 0-5 years
Location: Mumbai
https://assessment.hackerearth.com/challenges/new/hiring/netcore-backend-developer-hiring-challenge-december-2023-round-1/
HackerEarth
Netcore Backend Developer Hiring Challenge December 2023 - Round 1
Shortlist Update
Thank you for participating in the challenge. Netcore is currently assessing the profiles of all candidates who have cleared both Round 1 and 2. If Netcore finds your profile suitable for this position, they will contact you directly regardingโฆ
Thank you for participating in the challenge. Netcore is currently assessing the profiles of all candidates who have cleared both Round 1 and 2. If Netcore finds your profile suitable for this position, they will contact you directly regardingโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company : Terabyte Innovations
Position : SDE Intern - 6 Months
Work Location : Remote
https://www.linkedin.com/posts/terabyte-innovations_softwaredeveloper-internshipopportunity-terabyteinnovations-activity-7139517802079576064-RyGk?utm_source=share&utm_medium=member_desktop
Position : SDE Intern - 6 Months
Work Location : Remote
https://www.linkedin.com/posts/terabyte-innovations_softwaredeveloper-internshipopportunity-terabyteinnovations-activity-7139517802079576064-RyGk?utm_source=share&utm_medium=member_desktop
Linkedin
Terabyte innovations on LinkedIn: #softwaredeveloper #internshipopportunity #terabyteinnovationsโฆ | 251 comments
๐Opportunity for Freshers : Internship at Terabyte Innovations! ๐
Are you passionate about software development and eager to kick-start your career as aโฆ | 251 comments on LinkedIn
Are you passionate about software development and eager to kick-start your career as aโฆ | 251 comments on LinkedIn
Forwarded from Amazon Exam Placement Group (Dushyant)
int solve(vector<int>& points) {
sort(points.begin(), points.end(), greater<int>());
int p1 = 0, p2 = 0;
for(int i = 0; i < points.size(); i++) {
if(i % 2 == 0) {
p1 += points[i];
} else {
p2 += points[i];
}
}
return p1 - p2;
}
Amazon โ
sort(points.begin(), points.end(), greater<int>());
int p1 = 0, p2 = 0;
for(int i = 0; i < points.size(); i++) {
if(i % 2 == 0) {
p1 += points[i];
} else {
p2 += points[i];
}
}
return p1 - p2;
}
Amazon โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: MakerSharks
Role: Software Development Intern
Batch eligible: 2024 and 2025 passouts
Apply: https://www.makersharks.com/software-development-intern-application
Role: Software Development Intern
Batch eligible: 2024 and 2025 passouts
Apply: https://www.makersharks.com/software-development-intern-application
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Microsoft Hiring Software Engineer Intern
Batch - 2025
Link ๐
https://jobs.careers.microsoft.com/global/en/job/1577325/Software-Engineering---Internship-Opportunities
Batch - 2025
Link ๐
https://jobs.careers.microsoft.com/global/en/job/1577325/Software-Engineering---Internship-Opportunities
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
โ๏ธOptiver Off Campus Drive for Fresher 2023 Hiring Data Centre Engineer | 3-6 LPA*โ๏ธ
๐จโ๐ป Job Role : Data Centre Engineer
๐Qualification : B.E/B.Tech
๐Experience : 0 โ 1 years
๐ฐPackage : 3-6 LPA*
โญ๏ธ Apply Fast :
https://optiver.com/working-at-optiver/career-opportunities/6900822002/?gh_src=9fb491cd2
๐จโ๐ป Job Role : Data Centre Engineer
๐Qualification : B.E/B.Tech
๐Experience : 0 โ 1 years
๐ฐPackage : 3-6 LPA*
โญ๏ธ Apply Fast :
https://optiver.com/working-at-optiver/career-opportunities/6900822002/?gh_src=9fb491cd2
Optiver
Make an Impact with Optiver Careers
Impact the market. Meet new challenges by the nanosecond. Optiver careers offers opportunities in business, technology and trading so you can grow with us.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
โ๏ธECI Off Campus Freshers Hiring As Associate Software Engineer For All Graduates | 4 LPA*โ๏ธ
๐จโ๐ป Job Role : Associate Software Engineer
๐Qualification : Bachelorโs/Masterโs Degree
๐Batch : 2020/ 2021/ 2022/ 2023
๐ฐPackage : 4 LPA*
โญ๏ธ Apply Fast :
https://recruiting.ultipro.com/EZE1000EZECI/JobBoard/97cf9268-5a5a-480b-b7b6-5ed694da88c5/OpportunityDetail?opportunityId=3037d21b-e538-4246-a7d8-7dcbc8a5c4a3
๐จโ๐ป Job Role : Associate Software Engineer
๐Qualification : Bachelorโs/Masterโs Degree
๐Batch : 2020/ 2021/ 2022/ 2023
๐ฐPackage : 4 LPA*
โญ๏ธ Apply Fast :
https://recruiting.ultipro.com/EZE1000EZECI/JobBoard/97cf9268-5a5a-480b-b7b6-5ed694da88c5/OpportunityDetail?opportunityId=3037d21b-e538-4246-a7d8-7dcbc8a5c4a3
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Wood Consulting Hiring Graduate Engineer trainee
Batch: 2023, 2022, 2021 passout batch
Salary : 6lpa- 8 lpa per month
Application link : https://ehif.fa.em2.oraclecloud.com/hcmUI/CandidateExperience/en/job/1342/
Batch: 2023, 2022, 2021 passout batch
Salary : 6lpa- 8 lpa per month
Application link : https://ehif.fa.em2.oraclecloud.com/hcmUI/CandidateExperience/en/job/1342/
Wood
Graduate Engineer Trainee - Data
Wood's Consulting business (India, Chennai) is currently searching for a GET Data Engineer to support our local and international projects.