Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐HSBC Hiring
Role : Trainee Software Engineer
Eligibility : BE/B.Tech(2025) in CS / IT (with/without additional specialisation), CCE, AI ML, AI DS, Cybersecurity, Cloud
Salary : 6-10 LPA
Location : Pune
๐ปApply here : https://mycareer.hsbc.com/en_GB/external/PipelineDetail/Trainee-Software-Engineer/243852
Role : Trainee Software Engineer
Eligibility : BE/B.Tech(2025) in CS / IT (with/without additional specialisation), CCE, AI ML, AI DS, Cybersecurity, Cloud
Salary : 6-10 LPA
Location : Pune
๐ปApply here : https://mycareer.hsbc.com/en_GB/external/PipelineDetail/Trainee-Software-Engineer/243852
Hsbc
External Careers
typedef long long ll;
void solve() {
ll n = N;
vector<vector<ll>>arr(n, vector<ll>(3));
for (int i = 0; i < n; i++) {
arr[i] = {[0] = people[i] , [1] = starting[i] , [2] = ending[i]};
}
sort(arr.begin() , arr.end() , [&](vector<ll>& a , vector<ll>& b) {
if (a[1] == b[1]) return a[2] < b[2];
return a[1] < b[1];
});
ll sum = 0;
for (auto& x : arr) sum += x[0];
vector<ll>dp(n, -1);
auto recurr = [&](ll i , auto && recurr)->ll{
if (i >= n) return 0;
ll& ans = dp[i];
if (ans != -1) return ans; ans = 0;
ans = recurr(i + 1 , recurr);
ll low = i , high = n , val = arr[i][2];
while (high - low > 1) {
ll mid = (low + high) >> 1;
if (val >= arr[mid][1]) low = mid;
else high = mid;
}
ans = max(ans, arr[i][0] + recurr( low + 1 , recurr) );
return ans;
};
return sum - recurr(0, recurr);
}
Meeting Room โ
void solve() {
ll n = N;
vector<vector<ll>>arr(n, vector<ll>(3));
for (int i = 0; i < n; i++) {
arr[i] = {[0] = people[i] , [1] = starting[i] , [2] = ending[i]};
}
sort(arr.begin() , arr.end() , [&](vector<ll>& a , vector<ll>& b) {
if (a[1] == b[1]) return a[2] < b[2];
return a[1] < b[1];
});
ll sum = 0;
for (auto& x : arr) sum += x[0];
vector<ll>dp(n, -1);
auto recurr = [&](ll i , auto && recurr)->ll{
if (i >= n) return 0;
ll& ans = dp[i];
if (ans != -1) return ans; ans = 0;
ans = recurr(i + 1 , recurr);
ll low = i , high = n , val = arr[i][2];
while (high - low > 1) {
ll mid = (low + high) >> 1;
if (val >= arr[mid][1]) low = mid;
else high = mid;
}
ans = max(ans, arr[i][0] + recurr( low + 1 , recurr) );
return ans;
};
return sum - recurr(0, recurr);
}
Meeting Room โ
from collections import defaultdict, deque
def maxEqualGroups(a, b, c):
d = defaultdict(list)
for e, f in c:
e -= 1
f -= 1
d[e].append(f)
d[f].append(e)
g = [-1] * a
h = 0
def bfs(i):
j = deque([i])
g[i] = 0
k = [0, 0]
k[0] += 1
while j:
l = j.popleft()
m = g[l]
for n in d[l]:
if g[n] == -1:
g[n] = 1 - m
k[g[n]] += 1
j.append(n)
elif g[n] == m:
return None
return k
for o in range(a):
if g[o] == -1:
p = bfs(o)
if p is None:
return 0
h += min(p) * 2
return h // 2
Two groups โ
vector<int>freq(1000002,0);
int n = start.size();
for(int i=0; i<n; i++) {
freq[start[i]]++;
freq[end[i]+1]--;
}
for(int i=1; i<=1000001; i++) freq[i] += freq[i-1];
vector<int>temp;
for(int i=1; i<=1000000; i++) {
if(freq[i] >= k) temp.push_back(i);
}
vector<int>ans;
int p = q_start.size();
for(int i=0; i<p; i++) {
auto x = lower_bound(temp.begin(),temp.end(),q_start[i])-temp.begin();
auto y = upper_bound(temp.begin(),temp.end(),q_end[i])-temp.begin();
ans.push_back(y-x);
}
return ans;
Valid Number โ
int n = start.size();
for(int i=0; i<n; i++) {
freq[start[i]]++;
freq[end[i]+1]--;
}
for(int i=1; i<=1000001; i++) freq[i] += freq[i-1];
vector<int>temp;
for(int i=1; i<=1000000; i++) {
if(freq[i] >= k) temp.push_back(i);
}
vector<int>ans;
int p = q_start.size();
for(int i=0; i<p; i++) {
auto x = lower_bound(temp.begin(),temp.end(),q_start[i])-temp.begin();
auto y = upper_bound(temp.begin(),temp.end(),q_end[i])-temp.begin();
ans.push_back(y-x);
}
return ans;
Valid Number โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int findLowestPrice(vector<vector<string>> products, vector<vector<string>> discounts) {
int cost = 0;
map<string, int> mp;
for (vector<string> &d : discounts) {
string id = d[0];
int gg = d[1][0] - '0';
int disc = stoi(d[2]);
if (gg == 0) {
if (mp[id].find(0) == mp[id].end()) {
mp[id][0] = disc;
}
}
else {
mp[id][0] = min(mp[id][0], disc);
}
else mp[id][gg]=max(mp[id][gg],disc);
}
for (vector<string> &p : products) {
int price = stoi(p[0]), no_gravity12 = price;
for (int i = 1; i < m; i++) {
if (p[i] != "EMPTY") {
string id = p[i];
int d1 = mp[id][1];
int d2 = mp[id][2];
int price0 = mp[id].find(0) != mp[id].end() ? mp[id][0] : 0;
int price1 = max(0, price - (d1 * price + 99)/100);
int price2 = max(0, price - d2);
gg = min(gg, price0, price1, price2);
}
}
cost += gg;
}
return cost;
}
Shopping Cart Billing โ
int cost = 0;
map<string, int> mp;
for (vector<string> &d : discounts) {
string id = d[0];
int gg = d[1][0] - '0';
int disc = stoi(d[2]);
if (gg == 0) {
if (mp[id].find(0) == mp[id].end()) {
mp[id][0] = disc;
}
}
else {
mp[id][0] = min(mp[id][0], disc);
}
else mp[id][gg]=max(mp[id][gg],disc);
}
for (vector<string> &p : products) {
int price = stoi(p[0]), no_gravity12 = price;
for (int i = 1; i < m; i++) {
if (p[i] != "EMPTY") {
string id = p[i];
int d1 = mp[id][1];
int d2 = mp[id][2];
int price0 = mp[id].find(0) != mp[id].end() ? mp[id][0] : 0;
int price1 = max(0, price - (d1 * price + 99)/100);
int price2 = max(0, price - d2);
gg = min(gg, price0, price1, price2);
}
}
cost += gg;
}
return cost;
}
Shopping Cart Billing โ
Distance between two points โ
Zscaler
Zscaler
SELECT ID, NAME
FROM CUSTOMER
ORDER BY NAME DESC, ID ASC;
Order management system โ
Zscaler
FROM CUSTOMER
ORDER BY NAME DESC, ID ASC;
Order management system โ
Zscaler
vector<string> processLogs(vector<string> logs, int threshold)
}
Suspicious activity from logs โ
{
unordered_map<string, int> transaction_cou
nt;
for (const string& log : logs
) {
istringstream iss(lo
g);
string sender, recipie
nt;
int amou
nt;
iss >> sender >> recipient >> amou
nt;
transaction_count[sender]
++;
if (sender != recipient
) {
transaction_count[recipient]
++;
}
}
vector<string> suspicious_use
rs;
for (const auto& entry : transaction_count
) {
if (entry.second >= threshold
) {
suspicious_users.push_back(entry.firs
t);
}
}
sort(suspicious_users.begin(), suspicious_users.end(
));
return suspicious_use
rs
;}
Suspicious activity from logs โ
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
int findMinWeight(vector<int> weights, int d) {
priority_queue<int> maxHeap(weights.begin(), weights.end());
for (int i = 0; i < d; ++i) {
int maxWeight = maxHeap.top();
maxHeap.pop();
int remainingWeight = maxWeight / 2;
maxHeap.push(maxWeight - remainingWeight);
}
int totalWeight = 0;
while (!maxHeap.empty()) {
totalWeight += maxHeap.top();
maxHeap.pop();
}
return totalWeight;
}
Minimum total weight โ
#include <vector>
#include <queue>
using namespace std;
int findMinWeight(vector<int> weights, int d) {
priority_queue<int> maxHeap(weights.begin(), weights.end());
for (int i = 0; i < d; ++i) {
int maxWeight = maxHeap.top();
maxHeap.pop();
int remainingWeight = maxWeight / 2;
maxHeap.push(maxWeight - remainingWeight);
}
int totalWeight = 0;
while (!maxHeap.empty()) {
totalWeight += maxHeap.top();
maxHeap.pop();
}
return totalWeight;
}
Minimum total weight โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
int maximumInvitations(vector<int>& favourite) {
int n = favourite.size();
vector<bool> duoNode(n, false);
vector<int> indegree(n, 0);
vector<int> maxPathAt(n, 1);
for (int i = 0; i < n; i++) {
indegree[favourite[i]]++;
if (favourite[favourite[i]] == i) {
duoNode[i] = true;
duoNode[favourite[i]] = true;
}
}
int ans = 0;
vector<bool> visited(n, false);
for (int i = 0; i < n; i++) {
if (!indegree[i]) {
int cur = i;
while (!duoNode[cur] && !visited[cur] && !indegree[cur]) {
visited[cur] = true;
maxPathAt[favourite[cur]] = max(maxPathAt[favourite[cur]], maxPathAt[cur] + 1);
cur = favourite[cur];
indegree[cur]--;
}
}
}
for (int i = 0; i < n; i++) {
if (duoNode[i]) {
ans += maxPathAt[i];
}
}
int offset = 1;
fill(maxPathAt.begin(), maxPathAt.end(), 0);
fill(visited.begin(), visited.end(), false);
for (int i = 0; i < n; i++) {
if (!visited[i]) {
int prev, cur = i;
while (!maxPathAt[cur]) {
maxPathAt[cur] = offset++;
prev = cur;
cur = favourite[cur];
}
if (!visited[cur]) {
ans = max(ans, maxPathAt[prev] - maxPathAt[cur] + 1);
}
cur = i;
while (!visited[cur]) {
visited[cur] = true;
cur = favourite[cur];
}
}
}
return ans;
}
};
int main() {
Solution solution;
int N;
cin >> N;
vector<int> favourite(N);
for (int i = 0; i < N; i++) {
cin >> favourite[i];
favourite[i]--;
}
int result = solution.maximumInvitations(favourite);
cout << result << endl;
return 0;
}
Barclays โ
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
int maximumInvitations(vector<int>& favourite) {
int n = favourite.size();
vector<bool> duoNode(n, false);
vector<int> indegree(n, 0);
vector<int> maxPathAt(n, 1);
for (int i = 0; i < n; i++) {
indegree[favourite[i]]++;
if (favourite[favourite[i]] == i) {
duoNode[i] = true;
duoNode[favourite[i]] = true;
}
}
int ans = 0;
vector<bool> visited(n, false);
for (int i = 0; i < n; i++) {
if (!indegree[i]) {
int cur = i;
while (!duoNode[cur] && !visited[cur] && !indegree[cur]) {
visited[cur] = true;
maxPathAt[favourite[cur]] = max(maxPathAt[favourite[cur]], maxPathAt[cur] + 1);
cur = favourite[cur];
indegree[cur]--;
}
}
}
for (int i = 0; i < n; i++) {
if (duoNode[i]) {
ans += maxPathAt[i];
}
}
int offset = 1;
fill(maxPathAt.begin(), maxPathAt.end(), 0);
fill(visited.begin(), visited.end(), false);
for (int i = 0; i < n; i++) {
if (!visited[i]) {
int prev, cur = i;
while (!maxPathAt[cur]) {
maxPathAt[cur] = offset++;
prev = cur;
cur = favourite[cur];
}
if (!visited[cur]) {
ans = max(ans, maxPathAt[prev] - maxPathAt[cur] + 1);
}
cur = i;
while (!visited[cur]) {
visited[cur] = true;
cur = favourite[cur];
}
}
}
return ans;
}
};
int main() {
Solution solution;
int N;
cin >> N;
vector<int> favourite(N);
for (int i = 0; i < N; i++) {
cin >> favourite[i];
favourite[i]--;
}
int result = solution.maximumInvitations(favourite);
cout << result << endl;
return 0;
}
Barclays โ
#include <iostream>
using namespace std;
void cellCompete( int *arr, int days )
{
int num = 0;
for( int i = 0; i < 8; i++ )
{
num = ( num << 1 ) | arr[i];
}
for( int i = 0; i < days; i++ )
{
num = num << 1;
num = ( ( ( num << 1 ) ^ ( num >> 1 ) ) >> 1 ) & 0xFF;
}
for( int i = 0; i < 8; i++ )
{
arr[i] = ( num >> 7 - i ) & 0x01;
}
}
Pespico โ
using namespace std;
void cellCompete( int *arr, int days )
{
int num = 0;
for( int i = 0; i < 8; i++ )
{
num = ( num << 1 ) | arr[i];
}
for( int i = 0; i < days; i++ )
{
num = num << 1;
num = ( ( ( num << 1 ) ^ ( num >> 1 ) ) >> 1 ) & 0xFF;
}
for( int i = 0; i < 8; i++ )
{
arr[i] = ( num >> 7 - i ) & 0x01;
}
}
Pespico โ
import heapq
def minStops(a, b, c, d, e):
f = sorted(zip(b, c))
g = []
heapq.heapify(g)
h = e
i = 0
j = 0
for k in range(a):
l, m = f[k]
n = l - j
while h < n:
if not g:
return -1
h += -heapq.heappop(g)
i += 1
h -= n
j = l
heapq.heappush(g, -m)
o = d - j
while h < o:
if not g:
return -1
h += -heapq.heappop(g)
i += 1
return i
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Paypal
2023/22/21 passouts
Role : Associate Software Engineer
https://paypal.eightfold.ai/careers/job?domain=paypal.com&pid=274903982861&query=R0118464&domain=paypal.com&sort_by=relevance&job_index=0
2023/22/21 passouts
Role : Associate Software Engineer
https://paypal.eightfold.ai/careers/job?domain=paypal.com&pid=274903982861&query=R0118464&domain=paypal.com&sort_by=relevance&job_index=0
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company - Hugging Face
Role - ML Intern
Batch - 2023/2024/2025/2026
Stipend - 60-80k/month
Location - Remote
PPO after internship
Apply Link -
https://apply.workable.com/huggingface/j/0643507FC5/
Role - ML Intern
Batch - 2023/2024/2025/2026
Stipend - 60-80k/month
Location - Remote
PPO after internship
Apply Link -
https://apply.workable.com/huggingface/j/0643507FC5/
Workable
Hugging Face
Here at Hugging Face, weโre on a journey to advance and democratize ML for everyone. Along the way, we contribute to the development of technology for the better.