let fs = require("fs");
function longestSubstringTwoDistinct(s) {
let maxLen = 0;
let startIndex = 0;
let charIndexMap = new Map();
for (let i = 0; i < s.length; i++) {
charIndexMap.set(s[i], i);
if (charIndexMap.size > 2) {
let minIndex = Math.min(...charIndexMap.values());
charIndexMap.delete(s[minIndex]);
startIndex = minIndex + 1;
}
maxLen = Math.max(maxLen, i - startIndex + 1);
}
return maxLen;
}
function Main(arg) {
let inputString = String(arg);
return longestSubstringTwoDistinct(inputString);
}
Valid Paris
Victoria Secret โ
Victoria Secret โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Wassem Mohd on LinkedIn: #malaysia #internship #malaysia #software | 10 comments
EasyEat is hiring technology interns in #Malaysia
We are looking for three interns with a strong academic background with a degree in computer science orโฆ | 10 comments on LinkedIn
We are looking for three interns with a strong academic background with a degree in computer science orโฆ | 10 comments on LinkedIn
#include<bits/stdc++.h>
using namespace std;
vector<int> getExecTime(int n, vector<string> logs) {
vector<int> res(n, 0);
stack<int> st;
int prev = 0;
for(string log : logs) {
stringstream ss(log);
string buf;
getline(ss, buf, ':');
int id = stoi(buf);
getline(ss, buf, ':');
string type = buf;
getline(ss, buf, ':');
int time = stoi(buf);
if(!st.empty()) {
res[st.top()] += time - prev;
}
prev = time;
if(type == "start") {
st.push(id);
} else {
res[st.top()]++;
st.pop();
prev++;
}
}
return res;
}
IBMโ
using namespace std;
vector<int> getExecTime(int n, vector<string> logs) {
vector<int> res(n, 0);
stack<int> st;
int prev = 0;
for(string log : logs) {
stringstream ss(log);
string buf;
getline(ss, buf, ':');
int id = stoi(buf);
getline(ss, buf, ':');
string type = buf;
getline(ss, buf, ':');
int time = stoi(buf);
if(!st.empty()) {
res[st.top()] += time - prev;
}
prev = time;
if(type == "start") {
st.push(id);
} else {
res[st.top()]++;
st.pop();
prev++;
}
}
return res;
}
IBMโ
Maximum quirknessโ
ll ans=LLONG_MIN;
i=0;
ll sum=0;
set<ll> s;
while(i<n)
{
if(i)
ans=max(ans,sum+a[i]+c*i-*s.begin());
s.insert(sum+c*i);
sum+=a[i];
i++;
}
cout ยซ ans ยซ "\n";
ll ans=LLONG_MIN;
i=0;
ll sum=0;
set<ll> s;
while(i<n)
{
if(i)
ans=max(ans,sum+a[i]+c*i-*s.begin());
s.insert(sum+c*i);
sum+=a[i];
i++;
}
cout ยซ ans ยซ "\n";
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Maximum quirknessโ
ll ans=LLONG_MIN; i=0; ll sum=0; set<ll> s; while(i<n) { if(i) ans=max(ans,sum+a[i]+c*i-*s.begin()); s.insert(sum+c*i); sum+=a[i]; i++; } cout ยซ ans ยซ "\n";
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Neelabhra B. on LinkedIn: #laidoff #market #hiring #jobs #hyland #laidoff #openpositions #hiringโฆ | 12 comments
Update: Referred and replied to most of the applicants. Closing further referrals for now.
Happy Holidays, everyone!
While some of us are enjoying, thereโฆ | 12 comments on LinkedIn
Happy Holidays, everyone!
While some of us are enjoying, thereโฆ | 12 comments on LinkedIn
๐3
String Generation โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
hiring for SQL Server Operations: SQL Developer with 5+ years of experience for the Bangalore location,
below are the details:
Top 3 skills:
- Microsoft SQL Server 2022,2019, 2016
- Database Design and T-SQL Development
- SQL Security
- PL-SQL (Mandatory)
Notice Period: Immediate joiners only.
Working model: WFO
Interviews: F2F mode.
Interested candidates share me your updated resume to pbohara@teksystems.com with the following details (total years of experience, Current location, Preferred location, Current CTC, Expected CTC, notice period, Last working day (If serving NP)).
https://forms.office.com/r/vT9udEDUCz
below are the details:
Top 3 skills:
- Microsoft SQL Server 2022,2019, 2016
- Database Design and T-SQL Development
- SQL Security
- PL-SQL (Mandatory)
Notice Period: Immediate joiners only.
Working model: WFO
Interviews: F2F mode.
Interested candidates share me your updated resume to pbohara@teksystems.com with the following details (total years of experience, Current location, Preferred location, Current CTC, Expected CTC, notice period, Last working day (If serving NP)).
https://forms.office.com/r/vT9udEDUCz
Office
Please fill out this form
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Grant Thornton Bharat LLP is looking for suitable candidates with matching education and experience. Suitable candidates will have to work from Client location.
Location: New Delhi
Post 3 โ Consultant (38 Nos.)
Qualification โ B.Sc/B.E/B.Tech/M.Tech/MCA
Experience - >1 Year (Freshers only from IITs/NITs can also apply)
Details mentioned in the link
Prior Experience working in medical sector will be given preference.
Interested ones can fill the form below and give their details along with updated CV.
https://docs.google.com/forms/d/e/1FAIpQLSfP12azDEDbDQYtVrV1mtX-BVCWuUW8vUcS3Bx23bXwUOfDLg/viewform
Looking forward for your responses! Please reachout on Prateek.Kandulna@IN.GT.COM in case of any queries.
Location: New Delhi
Post 3 โ Consultant (38 Nos.)
Qualification โ B.Sc/B.E/B.Tech/M.Tech/MCA
Experience - >1 Year (Freshers only from IITs/NITs can also apply)
Details mentioned in the link
Prior Experience working in medical sector will be given preference.
Interested ones can fill the form below and give their details along with updated CV.
https://docs.google.com/forms/d/e/1FAIpQLSfP12azDEDbDQYtVrV1mtX-BVCWuUW8vUcS3Bx23bXwUOfDLg/viewform
Looking forward for your responses! Please reachout on Prateek.Kandulna@IN.GT.COM in case of any queries.