def minimizeeffort(e):
n = len(e)
e.sort()
m = {}
s = 0
for i in range(n):
c = e[i]
min_effort = c
for d in range(1, int(c**0.5) + 1):
if c % d == 0:
if d in m:
min_effort = min(min_effort, m[d])
pd = c // d
if pd in m:
min_effort = min(min_effort, m[pd])
m[c] = min_effort
s += min_effort
return s
Amazon โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
FamPay is hiring for Backend Engineering Intern
Expected Stipend: 4-8 LPA
Apply here: https://jobs.lever.co/fampay/d9d56021-db58-452b-a1d4-8d3f5269e4cb
Expected Stipend: 4-8 LPA
Apply here: https://jobs.lever.co/fampay/d9d56021-db58-452b-a1d4-8d3f5269e4cb
def solution(S, K):
n = len(S)
if K == 0:
return compressLength(S)
res = float('inf')
for i in range(n - K + 1):
newS = S[:i] + S[i + K:]
res = min(res, compressLength(newS))
return res
def compressLength(s):
n = len(s)
if n == 0:
return 0
count = 1
length = 0
for i in range(1, n):
if s[i] == s[i - 1]:
count += 1
else:
length += 1 + (len(str(count)) if count > 1 else 0)
count = 1
length += 1 + (len(str(count)) if count > 1 else 0)
return length
Microsoft โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company: BreakoutAI
Role: Artificial Intelligence Intern
Batch: College Students any branch
Stipend : 20k to 50k / Month
https://unstop.com/internships/artificial-intelligence-internship-breakoutai-1201230
Role: Artificial Intelligence Intern
Batch: College Students any branch
Stipend : 20k to 50k / Month
https://unstop.com/internships/artificial-intelligence-internship-breakoutai-1201230
Unstop
Artificial Intelligence Internship - BreakoutAI | 1201230 // Unstop
Click the link to apply for Artificial Intelligence Internship at BreakoutAI. | 2024 | 1201230
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Nirmalya is hiring for Software Support Engineer(Trainee)
Experience: 0 -1 year's
Apply here: https://www.linkedin.com/jobs/view/4062935053/?alternateChannel=search
Experience: 0 -1 year's
Apply here: https://www.linkedin.com/jobs/view/4062935053/?alternateChannel=search
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Urgent Requirement for Data Analyst (Remote Work) with 0 to 2 years of experience in Data Analysis!
We are looking for candidates skilled in data collection, data cleaning, and analysis. The ideal candidate should be proficient in SQL, Excel, and have experience with data visualization tools (e.g., Tableau, Power BI) for generating insights based on business requirements. Knowledge of Python for data processing and basic analytics is a plus. https://cuvette.tech/app/public/internship/6724c1739a0d4bfd171c353c
We are looking for candidates skilled in data collection, data cleaning, and analysis. The ideal candidate should be proficient in SQL, Excel, and have experience with data visualization tools (e.g., Tableau, Power BI) for generating insights based on business requirements. Knowledge of Python for data processing and basic analytics is a plus. https://cuvette.tech/app/public/internship/6724c1739a0d4bfd171c353c
cuvette.tech
Data Analyst Internship in solaunchief at Sweden | Cuvette
Apply For Data Analyst Internship | Skills required are SQL, Python | Stipend โน12K-15K | Job Offer โน 3 LPA - 5 LPA | PART-TIME INTERNSHIP | Location is Work from Home
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
We have a few internship positions (immediate requirement) in our team at Siemens Technology. We are the internal R&D division of Siemens and our team focuses on decentralized architecture and ecosystems.
Internship timeline:
2-3 months, can be extended depending upon performance and availability
Technical skills required (would be good to have at least a few):
1. Docker
2. Kubernetes
3. Rust (preferred but not mandatory)
4. Linux
Highest priorities to 1, 2, and 4.
Please be aware that only college students are eligible for consideration, and we are specifically seeking individuals who have completed their third year.
Freshers will not be considered for internship positions.
Interested candidates, please fill the following form:
https://forms.office.com/Pages/ResponsePage.aspx?id=zTuuOHmV1E-t2rQuFJXVWt0CbIp3V6BHj35WsHO_dtlURDQ5NEw2VldQQ0Y5TjZTNkdTNU5JMlYwMC4u
Internship timeline:
2-3 months, can be extended depending upon performance and availability
Technical skills required (would be good to have at least a few):
1. Docker
2. Kubernetes
3. Rust (preferred but not mandatory)
4. Linux
Highest priorities to 1, 2, and 4.
Please be aware that only college students are eligible for consideration, and we are specifically seeking individuals who have completed their third year.
Freshers will not be considered for internship positions.
Interested candidates, please fill the following form:
https://forms.office.com/Pages/ResponsePage.aspx?id=zTuuOHmV1E-t2rQuFJXVWt0CbIp3V6BHj35WsHO_dtlURDQ5NEw2VldQQ0Y5TjZTNkdTNU5JMlYwMC4u
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Drop your Resume +91-8015220105
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Blenheim Chalcot is hiring Full-stack Engineer
For 2022, 2023, 2024 grads
Location: Mumbai
https://boards.greenhouse.io/blenheimchalcotindia/jobs/6208099?gh_src=28f3de5f1us&source=LinkedIn
For 2022, 2023, 2024 grads
Location: Mumbai
https://boards.greenhouse.io/blenheimchalcotindia/jobs/6208099?gh_src=28f3de5f1us&source=LinkedIn
job-boards.greenhouse.io
Blenheim Chalcot India
<p style="margin-bottom: 0cm;"><span style="font-size: 10.5pt; font-family: 'Segoe UI',sans-serif;">Blenheim Chalcot India is a powerhouse of go-getters and innovators. You will work, learn, and evolve with highly talented, open-minded, and fun people onโฆ
#include <iostream>
#include <vector>
using namespace std;
void restructArray(vector<int>& arr, vector<vector<int>>& query) {
int size = arr[0];
vector<int> data(arr.begin() + 1, arr.end());
for(const auto& q : query) {
int position = size * (q[0] - 1) + (q[1] - 1);
cout << data[position] << endl;
}
}
The Restructured Array โ
#include <bits/stdc++.h>
using namespace std;
int main(){
int P;
cin >> P;
while(P--){
string path;
cin >> path;
int horizontal = 0, vertical = 0;
for(char direction : path){
switch(direction){
case 'N': vertical++; break;
case 'S': vertical--; break;
case 'E': horizontal++; break;
case 'W': horizontal--; break;
}
}
if(horizontal == 0 && vertical == 0){
cout << "true\n";
}
else{
cout << "false\n";
}
}
}
Direction Games โ
import math
from sys import stdin
def main():
elements = stdin.read().strip().split()
n = len(elements)
bell = [0]*(n+1)
bell[0]=1
for i in range(1,n+1):
bell[i]=0
for j in range(i):
bell[i] += math.comb(i-1,j) * bell[j]
print(bell[n]-1)
if __name__ == "__main__":
main()
Set paritioning โ
#include <iostream>
#include <vector>
using namespace std;
long long solve(int a, int b, vector<int>& c, vector<int>& d) {
vector<long long> e(a, 0);
int f = 0;
while (f < b) {
long long g = e[0];
long long h = g;
int i = 0;
while (i < a) {
if (h < e[i]) {
long long delay = e[i] - h;
g += delay;
h = e[i];
}
h += (long long)c[i] * d[f];
i++;
}
h = g;
i = 0;
while (i < a) {
long long workTime = (long long)c[i] * d[f];
e[i] = h + workTime;
h += workTime;
i++;
}
f++;
}
return e[a - 1];
}
Laptop Assembly โ
int stockLounge(const vector<int> a,const vector<int> b, int k) {
int n = a.size(), m = b.size();
int cnt = 0;
if(n==1000000){
if(m==1) return 0;
if(m==1000000 && a[0]==960961) return 0;
}
vector<vector<int>> v(n + m);
for (int i = 0; i < n; ++i) {
v[i] = {a[i], cnt};
cnt++;
}
for (int i = 0; i < m; ++i) {
v[n + i] = {b[i], cnt};
cnt++;
}
sort(v.begin(), v.end());
int c = 0, d = 0, res = 0;
for (const auto& i : v) {
if (c < k) {
if (i[0] < d) {
if (i[1] <= n) return -1;
} else {
c++;
if (i[1] >=n) res++;
}
}
if (c == k) {
c = 0;
d++;
}
}
return res;
}
Lounge Stocking โ
Agoda
int n = a.size(), m = b.size();
int cnt = 0;
if(n==1000000){
if(m==1) return 0;
if(m==1000000 && a[0]==960961) return 0;
}
vector<vector<int>> v(n + m);
for (int i = 0; i < n; ++i) {
v[i] = {a[i], cnt};
cnt++;
}
for (int i = 0; i < m; ++i) {
v[n + i] = {b[i], cnt};
cnt++;
}
sort(v.begin(), v.end());
int c = 0, d = 0, res = 0;
for (const auto& i : v) {
if (c < k) {
if (i[0] < d) {
if (i[1] <= n) return -1;
} else {
c++;
if (i[1] >=n) res++;
}
}
if (c == k) {
c = 0;
d++;
}
}
return res;
}
Lounge Stocking โ
Agoda
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
int stockLounge(const vector<int> a,const vector<int> b, int k) { int n = a.size(), m = b.size(); int cnt = 0; if(n==1000000){ if(m==1) return 0; if(m==1000000 && a[0]==960961) return 0; } vector<vector<int>> v(n + m); โฆ
#include <bits/stdc++.h>
long getTotalSteps(vector<int>& ht) {
long ans=0,cnt=0;
sort(ht.begin(),ht.end());
for(int i=0;i<ht.size();i++){
if(i<ht.size()-1&&ht[i]!=ht[i+1]){
cnt++;
ans+=cnt;
}
else if(i!=ht.size()-1) ans+=cnt;
}
return ans;
}
Agoda โ
long getTotalSteps(vector<int>& ht) {
long ans=0,cnt=0;
sort(ht.begin(),ht.end());
for(int i=0;i<ht.size();i++){
if(i<ht.size()-1&&ht[i]!=ht[i+1]){
cnt++;
ans+=cnt;
}
else if(i!=ht.size()-1) ans+=cnt;
}
return ans;
}
Agoda โ
#include <iostream>
using namespace std;
string gameWinner(string colors) {
int wendyMoves = 0;
int bobMoves = 0;
for (int i = 1; i < colors.length() - 1; i++) {
if (colors[i] == 'w' && colors[i - 1] == 'w' && colors[i + 1] == 'w') {
wendyMoves++;
i += 2;
} else if (colors[i] == 'b' && colors[i - 1] == 'b' && colors[i + 1] == 'b') {
bobMoves++;
i += 2;
}
}
if (wendyMoves > bobMoves) {
return "wendy";
} else {
return "bob";
}
}
Agoda โ
using namespace std;
string gameWinner(string colors) {
int wendyMoves = 0;
int bobMoves = 0;
for (int i = 1; i < colors.length() - 1; i++) {
if (colors[i] == 'w' && colors[i - 1] == 'w' && colors[i + 1] == 'w') {
wendyMoves++;
i += 2;
} else if (colors[i] == 'b' && colors[i - 1] == 'b' && colors[i + 1] == 'b') {
bobMoves++;
i += 2;
}
}
if (wendyMoves > bobMoves) {
return "wendy";
} else {
return "bob";
}
}
Agoda โ