๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
from collections import defaultdict def cheapestFare(n_towns, source, destination, max_stops, routes): graph = defaultdict(list) for start, end, cost in routes: graph[start].append((end, cost)) costs = [float('inf')] * n_towns โฆ
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll solve(ll n, vector<vector<ll>>& flights, ll src, ll dst, ll k)
{
vector<pair<ll,ll>> adj[n];
for(auto it : flights){
adj[it[0]].push_back({it[1],it[2]});
}
queue<pair<ll,pair<ll,ll>>>q;
q.push({0,{src,0}});
vector<ll>dist(n,1e9);
dist[src]=0;
while(!q.empty()){
auto it=q.front();
q.pop();
ll stops=it.first;
ll node=it.second.first;
ll wt=it.second.second;
if(stops>k)continue;
for(auto iter:adj[node]){
ll adjnode=iter.first;
ll dis=iter.second;
if(wt+dis<dist[adjnode]&&stops<=k){
dist[adjnode]=wt+dis;
q.push({stops+1,{adjnode,wt+dis}});
}
}
}
if(dist[dst]==1e9)return -1;
return dist[dst];
}
signed main()
{
ll n,src,des,k,m; cin>>n>>src>>des>>k>>m;
vector<vector<ll>>a(m,vector<ll>(3));
for(ll i=0;i<m;i++)
{
ll x,y,w; cin>>x>>y>>w;
a[i]={x,y,w};
}
cout <<solve(n,a,src,des,k)<<endl;
return 0;
}
Trip planner โ
#define ll long long
using namespace std;
ll solve(ll n, vector<vector<ll>>& flights, ll src, ll dst, ll k)
{
vector<pair<ll,ll>> adj[n];
for(auto it : flights){
adj[it[0]].push_back({it[1],it[2]});
}
queue<pair<ll,pair<ll,ll>>>q;
q.push({0,{src,0}});
vector<ll>dist(n,1e9);
dist[src]=0;
while(!q.empty()){
auto it=q.front();
q.pop();
ll stops=it.first;
ll node=it.second.first;
ll wt=it.second.second;
if(stops>k)continue;
for(auto iter:adj[node]){
ll adjnode=iter.first;
ll dis=iter.second;
if(wt+dis<dist[adjnode]&&stops<=k){
dist[adjnode]=wt+dis;
q.push({stops+1,{adjnode,wt+dis}});
}
}
}
if(dist[dst]==1e9)return -1;
return dist[dst];
}
signed main()
{
ll n,src,des,k,m; cin>>n>>src>>des>>k>>m;
vector<vector<ll>>a(m,vector<ll>(3));
for(ll i=0;i<m;i++)
{
ll x,y,w; cin>>x>>y>>w;
a[i]={x,y,w};
}
cout <<solve(n,a,src,des,k)<<endl;
return 0;
}
Trip planner โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Need HR for HR operations for Wipro๐ฅ๐ฅ๐ฅ
Experience: 0-3 years
Salary: 3 LPA
Date of offline Interview:22nd August, 2024
Time: 10.30 AM โ 11.30 AM
Address:Gigaplex Building 3, Mindspace โ Airoli West, 3rd Floor, Plot no. 1.T.5, MIDC, Airoli โ 400708
Skills/Requirements: ๐๐
1. Understanding and implementing company HR policies, as well as ensuring compliance with labor laws and regulations.
2. Managing HR processes efficiently, including employee records, payroll, benefits administration, and onboarding/offboarding procedures.
3. Effectively communicating with employees, management, and external partners to address HR-related inquiries and provide clear guidance on HR processes.
4. Identifying and resolving HR issues or discrepancies, such as payroll errors, benefits concerns, or employee relations matters, with a proactive and solution-oriented approach.
Experience: 0-3 years
Salary: 3 LPA
Date of offline Interview:22nd August, 2024
Time: 10.30 AM โ 11.30 AM
Address:Gigaplex Building 3, Mindspace โ Airoli West, 3rd Floor, Plot no. 1.T.5, MIDC, Airoli โ 400708
Skills/Requirements: ๐๐
1. Understanding and implementing company HR policies, as well as ensuring compliance with labor laws and regulations.
2. Managing HR processes efficiently, including employee records, payroll, benefits administration, and onboarding/offboarding procedures.
3. Effectively communicating with employees, management, and external partners to address HR-related inquiries and provide clear guidance on HR processes.
4. Identifying and resolving HR issues or discrepancies, such as payroll errors, benefits concerns, or employee relations matters, with a proactive and solution-oriented approach.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int dp[1005][1005][2];
int arr[10005];
int n;
int k;
int rec(int i, int curr, bool is)
{
if (i >= n)
{
if (curr == k)
{
return 0;
}
else
return -1e18;
}
if (curr > k)
return -1e17;
if (dp[i][curr][is] != -1)
return dp[i][curr][is];
if (is == 0)
{
int opt1 = rec(i + 1, curr, 0);
int opt2 = (curr)*arr[i] + rec(i + 1, curr, 1);
int opt3 = curr * arr[i] + rec(i + 1, curr + 1, 0);
return dp[i][curr][is] = max({opt1, opt2, opt3});
}
else
{
int opt1 = (curr)*arr[i] + rec(i + 1, curr, 1);
int opt2 = curr * arr[i] + rec(i + 1, curr + 1, 0);
return dp[i][curr][is] = max(opt1, opt2);
}
}
int32_t main()
{
cin >> n >> k;
for (int i = 0; i < n; i++)
cin >> arr[i];
memset(dp, -1, sizeof(dp));
int cnt = rec(0, 1, 0);
cout << cnt << endl;
return 0;
}
GetmaxBeauty โ
BNY Mellon
using namespace std;
#define int long long
int dp[1005][1005][2];
int arr[10005];
int n;
int k;
int rec(int i, int curr, bool is)
{
if (i >= n)
{
if (curr == k)
{
return 0;
}
else
return -1e18;
}
if (curr > k)
return -1e17;
if (dp[i][curr][is] != -1)
return dp[i][curr][is];
if (is == 0)
{
int opt1 = rec(i + 1, curr, 0);
int opt2 = (curr)*arr[i] + rec(i + 1, curr, 1);
int opt3 = curr * arr[i] + rec(i + 1, curr + 1, 0);
return dp[i][curr][is] = max({opt1, opt2, opt3});
}
else
{
int opt1 = (curr)*arr[i] + rec(i + 1, curr, 1);
int opt2 = curr * arr[i] + rec(i + 1, curr + 1, 0);
return dp[i][curr][is] = max(opt1, opt2);
}
}
int32_t main()
{
cin >> n >> k;
for (int i = 0; i < n; i++)
cin >> arr[i];
memset(dp, -1, sizeof(dp));
int cnt = rec(0, 1, 0);
cout << cnt << endl;
return 0;
}
GetmaxBeauty โ
BNY Mellon
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
UBS is hiring Interns
For 2023, 2024, 2025 grads
https://jobs.ubs.com/TGnewUI/Search/home/HomeWithPreLoad?jobid=304700&codes=fv&siteid=5012&partnerid=25008&PageType=JobDetails#jobDetails=304700_5012
For 2023, 2024, 2025 grads
https://jobs.ubs.com/TGnewUI/Search/home/HomeWithPreLoad?jobid=304700&codes=fv&siteid=5012&partnerid=25008&PageType=JobDetails#jobDetails=304700_5012
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Karbon Card is hiring for SDE Intern
Batch: 2025, 2026
Apply here:
https://docs.google.com/forms/d/e/1FAIpQLSdy23eJ_DUE8S1WfgJFhqCbyDbH4Sa21DSL0LWASKTB9xU_lA/viewform
Batch: 2025, 2026
Apply here:
https://docs.google.com/forms/d/e/1FAIpQLSdy23eJ_DUE8S1WfgJFhqCbyDbH4Sa21DSL0LWASKTB9xU_lA/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Natoma is hiring SWE
For 2021, 2022, 2023 grads
Location: Bangalore
https://app.dover.com/apply/natoma/2060a3ed-f24a-4446-96ab-ca0fd584cd32?rs=42706078
For 2021, 2022, 2023 grads
Location: Bangalore
https://app.dover.com/apply/natoma/2060a3ed-f24a-4446-96ab-ca0fd584cd32?rs=42706078
Dover
Software Engineer (Full Stack / Backend) at Natoma
Natoma is a technology platform reinventing the way organizations manage their non-human identities. We are seeking talented and motivated Software Engineers to join our early-stage team and play a pivotal role in shaping the future of non-human identityโฆ
public static int getMaxEfficiency(int[] arrivalTime) {
Arrays.sort(arrivalTime);
int maxEfficiency = Integer.MIN_VALUE;
int n = arrivalTime.length;
int left = 0;
for (int right = 1; right < n; right++) {
while (left < right && arrivalTime[right] - arrivalTime[left] > right - left) {
left++;
}
int activeTime = arrivalTime[right] - arrivalTime[left];
int testCases = right - left + 1;
int efficiency = testCases - activeTime;
maxEfficiency = Math.max(maxEfficiency, efficiency);
}
return maxEfficiency;
}
Expedia โ
Arrays.sort(arrivalTime);
int maxEfficiency = Integer.MIN_VALUE;
int n = arrivalTime.length;
int left = 0;
for (int right = 1; right < n; right++) {
while (left < right && arrivalTime[right] - arrivalTime[left] > right - left) {
left++;
}
int activeTime = arrivalTime[right] - arrivalTime[left];
int testCases = right - left + 1;
int efficiency = testCases - activeTime;
maxEfficiency = Math.max(maxEfficiency, efficiency);
}
return maxEfficiency;
}
Expedia โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
dentsu is hiring for SQL Developer
CTC : 5 - 9 LPA
Eligibility : Entry Level
Apply Here : https://dentsuaegis.wd3.myworkdayjobs.com/DAN_GLOBAL/job/Bangalore/SQL-Developer_R1040066-1
CTC : 5 - 9 LPA
Eligibility : Entry Level
Apply Here : https://dentsuaegis.wd3.myworkdayjobs.com/DAN_GLOBAL/job/Bangalore/SQL-Developer_R1040066-1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
techolution is looking for talented Python Interns to join our innovative team.
Location: Hyderabad (Onsite)
Eligible Batch: 2024/2025
Duration: 6 months - 12 months
Key Skills Required to Apply:
Proficiency in Modular Object Oriented Python Coding.
Experience with Flask/Django/FastAPl
Strong knowledge of Data Structures & Algorithms
Exposure to backend development
Knowledge of microservices architecture
Familiarity with cloud platforms (AWS/Azure/GCP)
Deployment experience with Docker/Kubernetes
If you believe that you match the criteria, share your resume at cavery.mahajan@techolution.com
Location: Hyderabad (Onsite)
Eligible Batch: 2024/2025
Duration: 6 months - 12 months
Key Skills Required to Apply:
Proficiency in Modular Object Oriented Python Coding.
Experience with Flask/Django/FastAPl
Strong knowledge of Data Structures & Algorithms
Exposure to backend development
Knowledge of microservices architecture
Familiarity with cloud platforms (AWS/Azure/GCP)
Deployment experience with Docker/Kubernetes
If you believe that you match the criteria, share your resume at cavery.mahajan@techolution.com
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
NXP WIT Mentorship Program 2024 for Females
Stipend: INR 50,000
Registration Link: https://wit.nxp.com/
Do share with your Juniors too
Stipend: INR 50,000
Registration Link: https://wit.nxp.com/
Do share with your Juniors too
Nxp
The World of semiconductor innovation welcomes the WOMEN CHANGEMAKERS
NXP WIT
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Yuvraj Singh on LinkedIn: #hiringnow #hiringdevelopers #hiringalert #datascience #ai #startupโฆ
Join Our Starting Core as a Data Science Intern!
We're looking for a passionate Data Science Intern to join our growing team! Work closely with our founderโฆ
We're looking for a passionate Data Science Intern to join our growing team! Work closely with our founderโฆ
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = 0;
for (long long i = 1; i * i <= n; i++) {
if (n % i == 0) {
ans += i;
if (i != n / i) {
ans += n / i;
}
}
}
cout << ans << endl;
return 0;
}
Sum of divisors โ
using namespace std;
int main() {
long long n;
cin >> n;
long long ans = 0;
for (long long i = 1; i * i <= n; i++) {
if (n % i == 0) {
ans += i;
if (i != n / i) {
ans += n / i;
}
}
}
cout << ans << endl;
return 0;
}
Sum of divisors โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Arsh Bhatia on LinkedIn: #hiring #careeropportunities #razorpay #techjobs #referral #jointheteamโฆ | 335 comments
๐ Exciting Opportunities at Razorpay! ๐
Razorpay is on the lookout for talented individuals to join their prestigious organization. If youโre passionateโฆ | 335 comments on LinkedIn
Razorpay is on the lookout for talented individuals to join their prestigious organization. If youโre passionateโฆ | 335 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Rubrik
Role: Software Engineer (Winter Intern)
Batch eligible: 2025 grads only
Apply: https://www.rubrik.com/company/careers/departments/job.6195381
Role: Software Engineer (Winter Intern)
Batch eligible: 2025 grads only
Apply: https://www.rubrik.com/company/careers/departments/job.6195381
Rubrik
Error
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: GFG
Role: MTS (DSA)
Eligibility: Only for 2024/ 2025 pass-outs
Location: Onsite (Noida Sector 136)
Duration: 6 months
Internship starting immediately.
If interested send your resume to: shreya.singh@geeksforgeeks.org
Role: MTS (DSA)
Eligibility: Only for 2024/ 2025 pass-outs
Location: Onsite (Noida Sector 136)
Duration: 6 months
Internship starting immediately.
If interested send your resume to: shreya.singh@geeksforgeeks.org
int findNetworkEndpoint(int start, const vector<int>& fromNodes, const vector<int>& toNodes) {
if (fromNodes.size() <= 0 || toNodes.size() >= 10000) return 0;
unordered_map<int, int> nodeMap;
for (size_t i = 0; i < fromNodes.size(); ++i) {
nodeMap[fromNodes[i]] = toNodes[i];
}
while (nodeMap.find(start) != nodeMap.end()) {
start = nodeMap[start];
}
return start;
}
Apple โ