Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Spinta Digital is hiring for Software Engineer
Expected Salary: 6-12 LPA
Apply here:
https://www.linkedin.com/jobs/view/4001609045/
Expected Salary: 6-12 LPA
Apply here:
https://www.linkedin.com/jobs/view/4001609045/
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
nolano.ai is hiring for Machine Learning Intern (Remote)
Experience: 0 - 2 year's
Expected Stipend: โน20,000 โ โน80,000 Per months
Apply here:
https://wellfound.com/jobs/3080797-remote-machine-learning-intern-finetuning-and-benchmarking
Experience: 0 - 2 year's
Expected Stipend: โน20,000 โ โน80,000 Per months
Apply here:
https://wellfound.com/jobs/3080797-remote-machine-learning-intern-finetuning-and-benchmarking
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Hexaware Technologies Limited invites you to Superset to apply
for its Hexaware ||
2025 passout only
Complete the registration and apply!
Deadline to Apply: Aug 31, 2025 12:00 AM
Apply link : https://app.joinsuperset.com/join/#/signup/student?jp=033fcedb-1649-4dd5-bf7f-38f1772f1171
for its Hexaware ||
2025 passout only
Complete the registration and apply!
Deadline to Apply: Aug 31, 2025 12:00 AM
Apply link : https://app.joinsuperset.com/join/#/signup/student?jp=033fcedb-1649-4dd5-bf7f-38f1772f1171
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Need Java Developers (2023-24 Graduates), Dot Net Developers (Open to all Graduates) and Python Developers (2023-24 Graduates) for Fortune Cloud*๐ฅ๐ฅ๐ฅ
Package Details:
1-3 Months Training Period: Stipend- Rs. 10,000 (fixed) + Rs. 5000 (performance -based)
After Training, Salary: Rs. 3.6LPA
Date of Interview: 22.08.2024 @ 09:30 AM sharp.
Venue: B-1, 3rd Floor, Abhinav Apartment, Besides Congress House Rd, Shivajinagar, Pune, Maharashtra- 411005 (Near Rathson Traders, Congress Bhawan).
Package Details:
1-3 Months Training Period: Stipend- Rs. 10,000 (fixed) + Rs. 5000 (performance -based)
After Training, Salary: Rs. 3.6LPA
Date of Interview: 22.08.2024 @ 09:30 AM sharp.
Venue: B-1, 3rd Floor, Abhinav Apartment, Besides Congress House Rd, Shivajinagar, Pune, Maharashtra- 411005 (Near Rathson Traders, Congress Bhawan).
def find_unsorted_subarray_length(nums):
n = len(nums)
left = 0
while left < n - 1 and nums[left] <= nums[left + 1]:
left += 1
if left == n - 1:
return 0
right = n - 1
while right > 0 and nums[right] >= nums[right - 1]:
right -= 1
min_val = min(nums[left:right + 1])
max_val = max(nums[left:right + 1])
while left > 0 and nums[left - 1] > min_val:
left -= 1
while right < n - 1 and nums[right + 1] < max_val:
right += 1
length = right - left + 1
return length
nums_input = input()
nums_list = list(map(int, nums_input.split()))
output1 = find_unsorted_subarray_length(nums_list)
print(output1)
Arrange the heights
Apple โ
n = len(nums)
left = 0
while left < n - 1 and nums[left] <= nums[left + 1]:
left += 1
if left == n - 1:
return 0
right = n - 1
while right > 0 and nums[right] >= nums[right - 1]:
right -= 1
min_val = min(nums[left:right + 1])
max_val = max(nums[left:right + 1])
while left > 0 and nums[left - 1] > min_val:
left -= 1
while right < n - 1 and nums[right + 1] < max_val:
right += 1
length = right - left + 1
return length
nums_input = input()
nums_list = list(map(int, nums_input.split()))
output1 = find_unsorted_subarray_length(nums_list)
print(output1)
Arrange the heights
Apple โ
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
void solve(string x) {
ll n = x.size();
vector<vector<ll>> dp(n, vector<ll>(n, 0));
for (ll i = 0; i < n; i++) {
dp[i][i] = 1;
}
for (ll k = 1; k < n; k++) {
for (ll i = 0; i < n - k; i++) {
ll j = i + k;
if (x[i] == x[j]) {
dp[i][j] = 2 + dp[i + 1][j - 1];
} else {
dp[i][j] = max(dp[i][j - 1], dp[i + 1][j]);
}
}
}
ll ans = 0;
for (ll i = 0; i < n; i++) {
for (ll j = 0; j < n - 1; j++) {
ans = max(ans, dp[i][j] * dp[j + 1][n - 1]);
}
}
cout << ans;
}
int main() {
string input;
cin >> input;
solve(input);
return 0;
}
Game of sequence reverse
Apple โ
#include <vector>
using namespace std;
#define ll long long
void solve(string x) {
ll n = x.size();
vector<vector<ll>> dp(n, vector<ll>(n, 0));
for (ll i = 0; i < n; i++) {
dp[i][i] = 1;
}
for (ll k = 1; k < n; k++) {
for (ll i = 0; i < n - k; i++) {
ll j = i + k;
if (x[i] == x[j]) {
dp[i][j] = 2 + dp[i + 1][j - 1];
} else {
dp[i][j] = max(dp[i][j - 1], dp[i + 1][j]);
}
}
}
ll ans = 0;
for (ll i = 0; i < n; i++) {
for (ll j = 0; j < n - 1; j++) {
ans = max(ans, dp[i][j] * dp[j + 1][n - 1]);
}
}
cout << ans;
}
int main() {
string input;
cin >> input;
solve(input);
return 0;
}
Game of sequence reverse
Apple โ
#include <iostream>
#include <string>
using namespace std;
bool isPalindrome(long long n) {
string s = to_string(n);
int len = s.length();
for (int i = 0; i < len / 2; ++i) {
if (s[i] != s[len - i - 1]) {
return false;
}
}
return true;
}
long long getNextPalindrome(long long N) {
while (true) {
++N;
if (isPalindrome(N)) {
return N;
}
}
}
int main() {
long long N;
cin >> N;
long long result = getNextPalindrome(N);
cout << result;
return 0;
}
Ascendion โ
#include <string>
using namespace std;
bool isPalindrome(long long n) {
string s = to_string(n);
int len = s.length();
for (int i = 0; i < len / 2; ++i) {
if (s[i] != s[len - i - 1]) {
return false;
}
}
return true;
}
long long getNextPalindrome(long long N) {
while (true) {
++N;
if (isPalindrome(N)) {
return N;
}
}
}
int main() {
long long N;
cin >> N;
long long result = getNextPalindrome(N);
cout << result;
return 0;
}
Ascendion โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def getSeatsAllocation(arr):
n = len(arr)
ppl = [[] for i in range(2 * n + 4)]
for i, x in enumerate(arr):
ppl[x].append(i)
h = []
ans = [-1] * n
for pos in range(1, 2 * n + 1):
for i in ppl[pos]:
heapq.heappush(h, (-pos, i))
if len(h) > 0:
ans[heapq.heappop(h)[1]] = pos
return ans
BNY(Intern)โ
n = len(arr)
ppl = [[] for i in range(2 * n + 4)]
for i, x in enumerate(arr):
ppl[x].append(i)
h = []
ans = [-1] * n
for pos in range(1, 2 * n + 1):
for i in ppl[pos]:
heapq.heappush(h, (-pos, i))
if len(h) > 0:
ans[heapq.heappop(h)[1]] = pos
return ans
BNY(Intern)โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
import java.util.*;
BNY(intern)โ
public class StockPrediction {
public List<Integer> predict(List<Integer> stockData, List<Integer> queries) {
List<Integer> result = new ArrayList<>();
int n = stockData.size();
TreeSet<Integer> treeSet = new TreeSet<>(stockData);
if (treeSet.size() == 1) {
Collections.fill(result, -1);
return result;
}
for (int query : queries) {
int stockPrice = stockData.get(query - 1);
if (treeSet.first() >= stockPrice) {
result.add(-1);
continue;
}
int nearestDay = -1;
int left = query - 2;
int right = query;
while (left >= 0 || right < n) {
if (left >= 0 && stockData.get(left) < stockPrice) {
nearestDay = left + 1;
break;
}
if (right < n && stockData.get(right) < stockPrice) {
nearestDay = right + 1;
break;
}
left--;
right++;
}
result.add(nearestDay);
}
return result;
}
BNY(intern)โ
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
struct M {
ll s;
ll r;
};
bool cmp(M a, M b) {
return a.r > b.r;
}
ll solve(vll& s, vll& r, ll m) {
ll n = s.size();
vector<M> v(n);
for(ll i=0; i<n; i++) {
v[i].s = s[i];
v[i].r = r[i];
}
sort(v.begin(), v.end(), cmp);
priority_queue<ll, vll, greater<ll>> q;
ll ts = 0, mq = 0;
for(ll i=0; i<n; i++) {
ts += v[i].s;
q.push(v[i].s);
if(q.size() > m) {
ts -= q.top();
q.pop();
}
mq = max(mq, ts * v[i].r);
}
return mq;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
vll s(n), r(n);
for(ll i=0; i<n; i++) {
cin >> s[i];
}
for(ll i=0; i<n; i++) {
cin >> r[i];
}
ll m;
cin >> m;
cout << solve(s, r, m) << endl;
return 0;
}
BNY (intern) โ
using namespace std;
#define ll long long
#define vll vector<ll>
struct M {
ll s;
ll r;
};
bool cmp(M a, M b) {
return a.r > b.r;
}
ll solve(vll& s, vll& r, ll m) {
ll n = s.size();
vector<M> v(n);
for(ll i=0; i<n; i++) {
v[i].s = s[i];
v[i].r = r[i];
}
sort(v.begin(), v.end(), cmp);
priority_queue<ll, vll, greater<ll>> q;
ll ts = 0, mq = 0;
for(ll i=0; i<n; i++) {
ts += v[i].s;
q.push(v[i].s);
if(q.size() > m) {
ts -= q.top();
q.pop();
}
mq = max(mq, ts * v[i].r);
}
return mq;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin >> n;
vll s(n), r(n);
for(ll i=0; i<n; i++) {
cin >> s[i];
}
for(ll i=0; i<n; i++) {
cin >> r[i];
}
ll m;
cin >> m;
cout << solve(s, r, m) << endl;
return 0;
}
BNY (intern) โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: S&P Global
Role: Software Development
Batch eligible: 2023 and 2024 grads
Apply: https://careers.spglobal.com/jobs/302056
Role: Software Development
Batch eligible: 2023 and 2024 grads
Apply: https://careers.spglobal.com/jobs/302056
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Groupon
Role: SDE 1
Batch eligible: 2023 and 2024 grads
Apply: https://groupon.wd5.myworkdayjobs.com/jobs/job/Bangalore-Gopalan-Axis-SEZ/Software-Development-Engineer-I_R28628
Role: SDE 1
Batch eligible: 2023 and 2024 grads
Apply: https://groupon.wd5.myworkdayjobs.com/jobs/job/Bangalore-Gopalan-Axis-SEZ/Software-Development-Engineer-I_R28628
๐3
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
costs[source] = 0
for i in range(max_stops + 1):
new_costs = costs.copy()
for start in range(n_towns):
if costs[start] == float('inf'):
continue
for end, cost in graph[start]:
new_costs[end] = min(new_costs[end], costs[start] + cost)
costs = new_costs
return costs[destination] if costs[destination] != float('inf') else -1
Trip planner
Makemytripโ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
using namespace std;
const int MOD = 1e9 + 7;
int countValidSeries(int n, int m, vector<int>& f) {
vector<vector<int>> dp(n + 1, vector<int>(m + 1, 0));
if (f[0] == 0) {
for (int j = 1; j <= m; ++j) {
dp[1][j] = 1;
}
} else {
dp[1][f[0]] = 1;
}
for (int i = 2; i <= n; ++i) {
if (f[i-1] == 0) {
for (int j = 1; j <= m; ++j) {
dp[i][j] = dp[i-1][j];
if (j > 1) dp[i][j] = (dp[i][j] + dp[i-1][j-1]) % MOD;
if (j < m) dp[i][j] = (dp[i][j] + dp[i-1][j+1]) % MOD;
}
} else {
int j = f[i-1];
dp[i][j] = dp[i-1][j];
if (j > 1) dp[i][j] = (dp[i][j] + dp[i-1][j-1]) % MOD;
if (j < m) dp[i][j] = (dp[i][j] + dp[i-1][j+1]) % MOD;
}
}
int result = 0;
for (int j = 1; j <= m; ++j) {
result = (result + dp[n][j]) % MOD;
}
return result;
}
int main() {
int n, m;
cout << "Enter the number of elements (n) and the maximum value (m): ";
cin >> n >> m;
vector<int> f(n);
cout << "Enter the series (0 for unknown, or an integer value for known positions): ";
for (int i = 0; i < n; ++i) {
cin >> f[i];
}
int result = countValidSeries(n, m, f);
cout << "The number of valid series is: " << result << endl;
return 0;
}
Flight series Counterโ
#include <vector>
using namespace std;
const int MOD = 1e9 + 7;
int countValidSeries(int n, int m, vector<int>& f) {
vector<vector<int>> dp(n + 1, vector<int>(m + 1, 0));
if (f[0] == 0) {
for (int j = 1; j <= m; ++j) {
dp[1][j] = 1;
}
} else {
dp[1][f[0]] = 1;
}
for (int i = 2; i <= n; ++i) {
if (f[i-1] == 0) {
for (int j = 1; j <= m; ++j) {
dp[i][j] = dp[i-1][j];
if (j > 1) dp[i][j] = (dp[i][j] + dp[i-1][j-1]) % MOD;
if (j < m) dp[i][j] = (dp[i][j] + dp[i-1][j+1]) % MOD;
}
} else {
int j = f[i-1];
dp[i][j] = dp[i-1][j];
if (j > 1) dp[i][j] = (dp[i][j] + dp[i-1][j-1]) % MOD;
if (j < m) dp[i][j] = (dp[i][j] + dp[i-1][j+1]) % MOD;
}
}
int result = 0;
for (int j = 1; j <= m; ++j) {
result = (result + dp[n][j]) % MOD;
}
return result;
}
int main() {
int n, m;
cout << "Enter the number of elements (n) and the maximum value (m): ";
cin >> n >> m;
vector<int> f(n);
cout << "Enter the series (0 for unknown, or an integer value for known positions): ";
for (int i = 0; i < n; ++i) {
cin >> f[i];
}
int result = countValidSeries(n, m, f);
cout << "The number of valid series is: " << result << endl;
return 0;
}
Flight series Counterโ
void fun(int i,int n,vector<int>&p,vector<int>&c,int x,int y,map<int,int>&m){
if(i==n){
m[x] = max(m[x],y);
return ;
}
fun(i+1,n,p,c,x+p[i],y+c[i],m);
fun(i+1,n,p,c,x,y,m);
return ;
}
int solve(vector<int>&p,vector<int>&c,int w){
int n = p.size();
map<int,int>m1,m;
fun(0,n/2,p,c,0,0,m);
int x = 0;
for(auto &it:m){
x=max(it.second,x);
it.second = x;
}
fun(n/2,n,p,c,0,0,m1);
x=0;
for(auto &it:m1){
x=max(it.second,x);
it.second = x;
}
int ans = 0;
for(auto it:m){
int r = w-it.first;
auto itt = m1.upper_bound(r);
if(itt != m1.begin()){
itt--;
ans = max(it.second+itt->second,ans);
}
}
for(auto it:m1){
int r = w-it.first;
auto itt = m.upper_bound(r);
if(itt != m.begin()){
itt--;
ans = max(it.second+itt->second,ans);
}
}
return ans;
}
Getmaxquantityโ
BNY Mellon
if(i==n){
m[x] = max(m[x],y);
return ;
}
fun(i+1,n,p,c,x+p[i],y+c[i],m);
fun(i+1,n,p,c,x,y,m);
return ;
}
int solve(vector<int>&p,vector<int>&c,int w){
int n = p.size();
map<int,int>m1,m;
fun(0,n/2,p,c,0,0,m);
int x = 0;
for(auto &it:m){
x=max(it.second,x);
it.second = x;
}
fun(n/2,n,p,c,0,0,m1);
x=0;
for(auto &it:m1){
x=max(it.second,x);
it.second = x;
}
int ans = 0;
for(auto it:m){
int r = w-it.first;
auto itt = m1.upper_bound(r);
if(itt != m1.begin()){
itt--;
ans = max(it.second+itt->second,ans);
}
}
for(auto it:m1){
int r = w-it.first;
auto itt = m.upper_bound(r);
if(itt != m.begin()){
itt--;
ans = max(it.second+itt->second,ans);
}
}
return ans;
}
Getmaxquantityโ
BNY Mellon