Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Cars24 is looking for design interns
mail your resume : anjali.mishra@cars24.com
mail your resume : anjali.mishra@cars24.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
JLL Technologies is hiring for Professional, Software Engineering
Experience: 0 - 1 year's
Expected Salary: 6 - 10 LPA
Apply here:
https://jll.wd1.myworkdayjobs.com/jlltcareers/job/Bengaluru-KA/Professional--Software-Engineering_REQ371065?source=APPLICANT_SOURCE-6-42
Experience: 0 - 1 year's
Expected Salary: 6 - 10 LPA
Apply here:
https://jll.wd1.myworkdayjobs.com/jlltcareers/job/Bengaluru-KA/Professional--Software-Engineering_REQ371065?source=APPLICANT_SOURCE-6-42
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Amazon is hiring for ML Data Associate I
Experience: 0 - 2 year's
Expected Salary: 35 LPA
Apply here:
https://amazon.jobs/en/jobs/2594644/ml-data-associate-i?cmpid=SPLICX0248M
Experience: 0 - 2 year's
Expected Salary: 35 LPA
Apply here:
https://amazon.jobs/en/jobs/2594644/ml-data-associate-i?cmpid=SPLICX0248M
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
IBM is hiring for Software Engineer Intern
Apply here:
https://careers.ibm.com/job/20481519/intern-software-engineer-remote/
Apply here:
https://careers.ibm.com/job/20481519/intern-software-engineer-remote/
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def key_generation(key_mode, roles):
all_permissions = {
"payments": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent",
"update_dispute", "create_dispute", "read_dispute", "create_refund", "cancel_refund", "read_refund"],
"banking": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"],
"identity": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"],
"climate": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"],
"capital": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"]
}
read_permissions = {
"payments": ["read_settings", "read_intent", "read_dispute", "read_refund"],
"banking": ["read_settings", "read_intent"],
"identity": ["read_settings", "read_intent"],
"climate": ["read_settings", "read_intent"],
"capital": ["read_settings", "read_intent"]
}
roles_dict = {
"admin": set(),
"admin_readonly": set()
}
for product, perms in all_permissions.items():
roles_dict["admin"].update([f"{product}.{perm}" for perm in perms])
for product, perms in read_permissions.items():
roles_dict["admin_readonly"].update([f"{product}.{perm}" for perm in perms])
for product in all_permissions.keys():
roles_dict[product] = set([f"{product}.{perm}" for perm in all_permissions[product]])
user_permissions = set()
for role in roles:
if role in roles_dict:
user_permissions.update(roles_dict[role])
if key_mode == "permissions":
for permission in sorted(user_permissions):
print(permission)
Permissions and Roles โ
all_permissions = {
"payments": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent",
"update_dispute", "create_dispute", "read_dispute", "create_refund", "cancel_refund", "read_refund"],
"banking": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"],
"identity": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"],
"climate": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"],
"capital": ["read_settings", "read_intent", "write_settings", "create_intent", "confirm_intent"]
}
read_permissions = {
"payments": ["read_settings", "read_intent", "read_dispute", "read_refund"],
"banking": ["read_settings", "read_intent"],
"identity": ["read_settings", "read_intent"],
"climate": ["read_settings", "read_intent"],
"capital": ["read_settings", "read_intent"]
}
roles_dict = {
"admin": set(),
"admin_readonly": set()
}
for product, perms in all_permissions.items():
roles_dict["admin"].update([f"{product}.{perm}" for perm in perms])
for product, perms in read_permissions.items():
roles_dict["admin_readonly"].update([f"{product}.{perm}" for perm in perms])
for product in all_permissions.keys():
roles_dict[product] = set([f"{product}.{perm}" for perm in all_permissions[product]])
user_permissions = set()
for role in roles:
if role in roles_dict:
user_permissions.update(roles_dict[role])
if key_mode == "permissions":
for permission in sorted(user_permissions):
print(permission)
Permissions and Roles โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void dfs(int v, const vector<vector<int>>& adjList, vector<bool>& visited) {
visited[v] = true;
for (int adjV : adjList[v]) {
if (!visited[adjV]) {
dfs(adjV, adjList, visited);
}
}
}
vector<int> solve(int flightNodes, const vector<int>& flightFrom, const vector<int>& flightTo, int m, const vector<int>& initiallyDelayed, int k) {
vector<vector<int>> adjList(flightNodes);
for (int i = 0; i < m; ++i) {
adjList[flightFrom[i] - 1].push_back(flightTo[i] - 1);
}
vector<bool> visited(flightNodes, false);
for (int i = 0; i < k; ++i) {
if (!visited[initiallyDelayed[i] - 1]) {
dfs(initiallyDelayed[i] - 1, adjList, visited);
}
}
vector<int> delayedFlights;
for (int i = 0; i < flightNodes; ++i) {
if (visited[i]) {
delayedFlights.push_back(i + 1);
}
}
sort(delayedFlights.begin(), delayedFlights.end());
return delayedFlights;
}
#include <vector>
#include <algorithm>
using namespace std;
void dfs(int v, const vector<vector<int>>& adjList, vector<bool>& visited) {
visited[v] = true;
for (int adjV : adjList[v]) {
if (!visited[adjV]) {
dfs(adjV, adjList, visited);
}
}
}
vector<int> solve(int flightNodes, const vector<int>& flightFrom, const vector<int>& flightTo, int m, const vector<int>& initiallyDelayed, int k) {
vector<vector<int>> adjList(flightNodes);
for (int i = 0; i < m; ++i) {
adjList[flightFrom[i] - 1].push_back(flightTo[i] - 1);
}
vector<bool> visited(flightNodes, false);
for (int i = 0; i < k; ++i) {
if (!visited[initiallyDelayed[i] - 1]) {
dfs(initiallyDelayed[i] - 1, adjList, visited);
}
}
vector<int> delayedFlights;
for (int i = 0; i < flightNodes; ++i) {
if (visited[i]) {
delayedFlights.push_back(i + 1);
}
}
sort(delayedFlights.begin(), delayedFlights.end());
return delayedFlights;
}
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
vector<int> solve(int N, int M, vector<int>& ans) {
vector<int> res;
res.reserve(M);
priority_queue<pair<long long, int>,
vector<pair<long long, int>>,
greater<pair<long long, int>>> pq;
for (int i = 1; i <= N; ++i) {
pq.push(make_pair(0LL, i));
}
for (int it : ans) {
pair<long long, int> top = pq.top();
pq.pop();
long long load = top.first;
int x = top.second;
res.push_back(x);
pq.push(make_pair(load + it, x));
}
return res;
}
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n=2,m=2;
vector<int> ans={5,5};
vector<int> ans1=solve(n,m,ans);
for(int i=0;i<ans1.size();i++) cout<<ans1[i]<<" ";
}
Servers โ
using namespace std;
vector<int> solve(int N, int M, vector<int>& ans) {
vector<int> res;
res.reserve(M);
priority_queue<pair<long long, int>,
vector<pair<long long, int>>,
greater<pair<long long, int>>> pq;
for (int i = 1; i <= N; ++i) {
pq.push(make_pair(0LL, i));
}
for (int it : ans) {
pair<long long, int> top = pq.top();
pq.pop();
long long load = top.first;
int x = top.second;
res.push_back(x);
pq.push(make_pair(load + it, x));
}
return res;
}
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n=2,m=2;
vector<int> ans={5,5};
vector<int> ans1=solve(n,m,ans);
for(int i=0;i<ans1.size();i++) cout<<ans1[i]<<" ";
}
Servers โ
class MovieTicket {
public:
MovieTicket() {
}
bool book(int userId, int movieId) {
if (userBookings[userId].find(movieId) != userBookings[userId].end() || availableTickets[movieId] == 0) {
return false;
}
userBookings[userId].insert(movieId);
movieBookings[movieId].insert(userId);
availableTickets[movieId]--;
return true;
}
bool cancel(int userId, int movieId) {
if (userBookings[userId].find(movieId) == userBookings[userId].end()) {
return false;
}
userBookings[userId].erase(movieId);
movieBookings[movieId].erase(userId);
availableTickets[movieId]++;
return true;
}
bool isBooked(int userId, int movieId) {
return userBookings[userId].find(movieId) != userBookings[userId].end();
}
int availableTicketsCount(int movieId) {
return availableTickets[movieId];
}
private:
unordered_map<int, unordered_set<int>> userBookings;
unordered_map<int, unordered_set<int>> movieBookings;
unordered_map<int, int> availableTickets = [] {
unordered_map<int, int> m;
for (int i = 1; i <= 1000; ++i) {
m[i] = 100;
}
return m;
}();
};
movie tickets โ
public:
MovieTicket() {
}
bool book(int userId, int movieId) {
if (userBookings[userId].find(movieId) != userBookings[userId].end() || availableTickets[movieId] == 0) {
return false;
}
userBookings[userId].insert(movieId);
movieBookings[movieId].insert(userId);
availableTickets[movieId]--;
return true;
}
bool cancel(int userId, int movieId) {
if (userBookings[userId].find(movieId) == userBookings[userId].end()) {
return false;
}
userBookings[userId].erase(movieId);
movieBookings[movieId].erase(userId);
availableTickets[movieId]++;
return true;
}
bool isBooked(int userId, int movieId) {
return userBookings[userId].find(movieId) != userBookings[userId].end();
}
int availableTicketsCount(int movieId) {
return availableTickets[movieId];
}
private:
unordered_map<int, unordered_set<int>> userBookings;
unordered_map<int, unordered_set<int>> movieBookings;
unordered_map<int, int> availableTickets = [] {
unordered_map<int, int> m;
for (int i = 1; i <= 1000; ++i) {
m[i] = 100;
}
return m;
}();
};
movie tickets โ
def getLongestSubsequence(arr):
n = len(arr)
max_len = 0
for i in range(n):
for j in range(i, n):
x, y = arr[i], arr[j]
length = 0
expect_x = True
for k in range(i, n):
if (expect_x and arr[k] == x) or (not expect_x and arr[k] == y):
length += 1
expect_x = not expect_x
max_len = max(max_len, length)
return max_len
arr = list(map(int, input().split(',')))
result = getLongestSubsequence(arr)
print(result)
//Interesting sequence
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
If you are looking for analyst roles
0-3 YOE required
https://www.linkedin.com/posts/nishchaynath_google-forms-sign-in-activity-7219229515196112896-5VNm
0-3 YOE required
https://www.linkedin.com/posts/nishchaynath_google-forms-sign-in-activity-7219229515196112896-5VNm
Linkedin
Nishchay Nath on LinkedIn: Google Forms: Sign-in
Hiring for a couple of roles.
- Investment Analyst
- Marketing Analyst
- Product Analyst
- Data Analyst
Folks with 0-3 years of experience and enthu for aโฆ
- Investment Analyst
- Marketing Analyst
- Product Analyst
- Data Analyst
Folks with 0-3 years of experience and enthu for aโฆ
string solution(string &forth){
int xmin = 0 , xmax = 0;
int x = 0 , y = 0;
for(char d : forth){
if(d == 'E') xmax = max(xmax , ++x);
else if(d == 'W') xmin = min(xmin , --x);
else y++;
}
string L = string(x + 1 - xmin , 'W') + string(y , 'S') + string(1 - xmin , 'E');
string R = string(xmax + 1 - x , 'E') + string(y , 'S') + string(xmax + 1, 'W');
return L.size() < R.size() ? L : R;
}
MS 1
int xmin = 0 , xmax = 0;
int x = 0 , y = 0;
for(char d : forth){
if(d == 'E') xmax = max(xmax , ++x);
else if(d == 'W') xmin = min(xmin , --x);
else y++;
}
string L = string(x + 1 - xmin , 'W') + string(y , 'S') + string(1 - xmin , 'E');
string R = string(xmax + 1 - x , 'E') + string(y , 'S') + string(xmax + 1, 'W');
return L.size() < R.size() ? L : R;
}
MS 1
โค1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<int>& A, vector<int>& B, int X, int Y) {
int N = A.size();
vector<int> dpA(N), dpB(N);
// Initial condition: Start at position 0 on either line
dpA[0] = A[0];
dpB[0] = B[0];
// Fill the dp arrays
for (int i = 1; i < N; ++i) {
dpA[i] = min(dpA[i - 1] + A[i], dpB[i - 1] + Y + A[i]);
dpB[i] = min(dpB[i - 1] + B[i], dpA[i - 1] + X + B[i]);
}
// The result is the minimum time to complete the car on either line at the last position
return min(dpA[N - 1], dpB[N - 1]);
}
int main() {
int N, X, Y;
cin >> N >> X >> Y;
vector<int> A(N), B(N);
for (int i = 0; i < N; ++i) {
cin >> A[i];
}
for (int i = 0; i < N; ++i) {
cin >> B[i];
}
cout << solution(A, B, X, Y) << endl;
return 0;
}
Ms task2
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<int>& A, vector<int>& B, int X, int Y) {
int N = A.size();
vector<int> dpA(N), dpB(N);
// Initial condition: Start at position 0 on either line
dpA[0] = A[0];
dpB[0] = B[0];
// Fill the dp arrays
for (int i = 1; i < N; ++i) {
dpA[i] = min(dpA[i - 1] + A[i], dpB[i - 1] + Y + A[i]);
dpB[i] = min(dpB[i - 1] + B[i], dpA[i - 1] + X + B[i]);
}
// The result is the minimum time to complete the car on either line at the last position
return min(dpA[N - 1], dpB[N - 1]);
}
int main() {
int N, X, Y;
cin >> N >> X >> Y;
vector<int> A(N), B(N);
for (int i = 0; i < N; ++i) {
cin >> A[i];
}
for (int i = 0; i < N; ++i) {
cin >> B[i];
}
cout << solution(A, B, X, Y) << endl;
return 0;
}
Ms task2
๐1
int solve(vector<int>& sequence) {
int n = sequence.size();
vector<int> dp(n + 1, INT_MAX);
dp[0] = 0;
for (int i = 0; i < n; ++i) {
if (dp[i] == INT_MAX) continue;
int groupSize = sequence[i];
if (i + groupSize < n) {
dp[i + groupSize + 1] =min(dp[i + groupSize + 1], dp[i]);
}
dp[i + 1] = min(dp[i + 1], dp[i] + 1);
}
return dp[n];
}
Uber โ
int n = sequence.size();
vector<int> dp(n + 1, INT_MAX);
dp[0] = 0;
for (int i = 0; i < n; ++i) {
if (dp[i] == INT_MAX) continue;
int groupSize = sequence[i];
if (i + groupSize < n) {
dp[i + groupSize + 1] =min(dp[i + groupSize + 1], dp[i]);
}
dp[i + 1] = min(dp[i + 1], dp[i] + 1);
}
return dp[n];
}
Uber โ
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll n;
ll minFreq=0;
unordered_map<ll,pair<ll,ll>> keyVal;
unordered_map<ll,list<ll>> freqList;
unordered_map<ll,list<ll>::iterator> pos;
ll get(ll key)
{
if(keyVal.find(key) == keyVal.end()) return -1;
freqList[keyVal[key].second].erase(pos[key]);
keyVal[key].second++;
freqList[keyVal[key].second].push_back(key);
pos[key] = --freqList[keyVal[key].second].end();
if(freqList[minFreq].empty()) minFreq++;
return keyVal[key].first;
}
void put(ll key, ll value)
{
if(!n) return;
if(keyVal.find(key) != keyVal.end())
{
keyVal[key].first = value;
freqList[keyVal[key].second].erase(pos[key]);
keyVal[key].second++;
freqList[keyVal[key].second].push_back(key);
pos[key] = --freqList[keyVal[key].second].end();
if(freqList[minFreq].empty())
minFreq++;
return;
}
if(keyVal.size()==n)
{
ll delKey = freqList[minFreq].front();
keyVal.erase(delKey);
pos.erase(delKey);
freqList[minFreq].pop_front();
}
keyVal[key] = {value,1};
freqList[1].push_back(key);
pos[key] = --freqList[1].end();
minFreq = 1;
}
signed main()
{
cin>>n;
ll q; cin>>q;
while(q--)
{
ll x,y,z; cin>>x>>y>>z;
if(x==1) cout<<get(y)<<" ";
else put(y,z);
}
return 0;
}
Catch it โ