Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Email: hr@webinfinitesolutions.com
Contact: +919465532412
Contact: +919465532412
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Send your updated resume at:
hr@trioangle.com
hr@trioangle.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: The Trade Desk
Role: Software Engineering Intern
Batch eligible: 2025 grads (2026 grads can also try)
Apply: https://boards.greenhouse.io/thetradedesk/jobs/4435073007
Role: Software Engineering Intern
Batch eligible: 2025 grads (2026 grads can also try)
Apply: https://boards.greenhouse.io/thetradedesk/jobs/4435073007
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
public static int countMeetings(int[] firstDay, int[] lastDay) {
int n = firstDay.length;
TreeSet<Integer> availableDays = new TreeSet<>();
for (int i = 1; i <= 100000; i++) {
availableDays.add(i);
}
int count = 0;
for (int i = 0; i < n; i++) {
int start = firstDay[i];
int end = lastDay[i];
Integer day = availableDays.ceiling(start);
if (day != null && day <= end) {
count++;
availableDays.remove(day);
}
}
return count;
}
Standard chartered โ
int n = firstDay.length;
TreeSet<Integer> availableDays = new TreeSet<>();
for (int i = 1; i <= 100000; i++) {
availableDays.add(i);
}
int count = 0;
for (int i = 0; i < n; i++) {
int start = firstDay[i];
int end = lastDay[i];
Integer day = availableDays.ceiling(start);
if (day != null && day <= end) {
count++;
availableDays.remove(day);
}
}
return count;
}
Standard chartered โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
WE'RE NOW ON DISCORD โค
OUR Coding Community โจ
We've launched our new discord server, you all can join there ASAP
Here's the exclusive link ๐
https://discord.gg/5YrwWzaF
Join fast. See you all โค
OUR Coding Community โจ
We've launched our new discord server, you all can join there ASAP
Here's the exclusive link ๐
https://discord.gg/5YrwWzaF
Join fast. See you all โค
Discord
Join the Coding Zone Discord Server!
Check out the Coding Zone community on Discord - hang out with 231 other members and enjoy free voice and text chat.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: ADP
Role: Associate Software Engineer
Batch eligible: 2024 and 2025 grads
Apply: https://tech.adp.com/en/jobs/5001062749106/associate-software-engineer/
Role: Associate Software Engineer
Batch eligible: 2024 and 2025 grads
Apply: https://tech.adp.com/en/jobs/5001062749106/associate-software-engineer/
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int mrt2(const string& st) {
int n = st.length();
vector<vector<int>> lst(n, vector<int>(n, 0));
for (int i = 0; i < n; ++i)
lst[i][i] = 1;
for (int k = 2; k <= n; ++k) {
for (int i = 0; i <= n - k; ++i) {
int j = i + k - 1;
if (st[i] == st[j]) {
if (k == 2)
lst[i][j] = 2;
else
lst[i][j] = lst[i + 1][j - 1] + 2;
} else {
lst[i][j] = max(lst[i + 1][j], lst[i][j - 1]);
}
}
}
return lst[0][n - 1];
}
int delete_op(const string& st) {
int n = st.length();
int lps = mrt2(st);
return n - lps;
}
bool rearrange(const string& S) {
unordered_map<char, int> freq;
for (char c : S) {
freq[c]++;
}
int odd_count = 0;
for (auto& p : freq) {
if (p.second % 2 == 1)
odd_count++;
}
return odd_count <= 1;
}
vector<int> mrt(const string& S, const vector<pair<int, int>>& arr) {
vector<int> res;
for (auto& range : arr) {
string temp = S.substr(range.first - 1, range.second - range.first + 1);
int result = rearrange(temp) ? 0 : delete_op(temp);
res.push_back(result);
}
return res;
}
String and queries
OLAโ
๐1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int minimizeDiff(int a, vector<int>& b) {
int c = b.size();
int d = *max_element(b.begin(), b.end());
int e = *min_element(b.begin(), b.end());
if ((d - e) <= a) {
return (d - e);
}
int f = (d + e) / 2;
for (int g = 0; g < c; g++) {
if (b[g] > f) {
b[g] -= a;
} else {
b[g] += a;
}
}
d = *max_element(b.begin(), b.end());
e = *min_element(b.begin(), b.end());
return (d - e);
}
ICE CREAM Sticks โ
Intuit
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll mod = 1e9 + 7;
ll add(ll x, ll y)
{
return (x + y) % mod;
}
ll mul(ll x, ll y)
{
return (x * y) % mod;
}
ll dp[101][101][101];
ll solver(ll i, ll maxm, ll n, ll m, ll totalCost)
{
if (i == n)
{
if (totalCost == 0)
{
return 1;
}
else
{
return 0;
}
}
if (dp[i][maxm][totalCost] != -1)
{
return dp[i][maxm][totalCost];
}
ll temp = 0;
for (int j = 1;j <= m;j++)
{
if (j > maxm)
{
temp = add(temp, solver(i + 1, j, n, m, totalCost - 1));
}
else
{
temp = add(temp, solver(i + 1, maxm, n, m, totalCost));
}
}
return dp[i][maxm][totalCost] = temp;
}
void solve(vector<ll>n, vector<ll> m, vector<ll> totalCost)
{
ll q = n.size();
vector<ll>answer(q);
for (int j = 0;j < q;j++)
{
memset(dp, -1, sizeof(dp));
ll N= n[j];
ll M= m[j];
ll Tot= totalCost[j];
ll ans = 0;
for (int i = 1;i <= M;i++)
{
ans = add(ans, solver(1, i, N, M, Tot));
}
answer.push_back(ans);
}
for (int j = 0;j < q;j++)
{
cout << answer[j] << endl;
}
return;
}
/// reconstracting array โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
public class Solution {
public static long calculateTotalRegion(int[] h) {
int n = h.length;
long[] l = new long[n];
long[] r = new long[n];
for (int i = 1; i < n; i++) {
int j = i - 1;
while (j >= 0 && h[j] <= h[i]) {
l[i] += l[j];
j -= l[j];
}
}
for (int i = n - 2; i >= 0; i--) {
int j = i + 1;
while (j < n && h[j] <= h[i]) {
r[i] += r[j];
j += r[j];
}
}
long t = 0;
for (int i = 0; i < n; i++) {
t += l[i] + r[i] - 1;
}
return t;
}
BNY Mellon โ
public static long calculateTotalRegion(int[] h) {
int n = h.length;
long[] l = new long[n];
long[] r = new long[n];
for (int i = 1; i < n; i++) {
int j = i - 1;
while (j >= 0 && h[j] <= h[i]) {
l[i] += l[j];
j -= l[j];
}
}
for (int i = n - 2; i >= 0; i--) {
int j = i + 1;
while (j < n && h[j] <= h[i]) {
r[i] += r[j];
j += r[j];
}
}
long t = 0;
for (int i = 0; i < n; i++) {
t += l[i] + r[i] - 1;
}
return t;
}
BNY Mellon โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll solve(vector<ll>& arr)
{
unordered_map<ll,ll>freq;
for (auto it:arr)
{
freq[it]++;
}
vector<ll>un;
for (auto& it:freq)
{
un.push_back(it.first);
}
sort(un.begin(),un.end());
ll val=un[0],res=0,prev=0;
for(auto num:un)
{
if (num==val)
{
ll cur=(prev+1)*freq[num];
res=(res+cur);
prev=cur;
val++;
}
else
{
prev=freq[num];
res=(res+freq[num]);
val=num+1;
}
}
return res;
}
signed main() {
ll n; cin>>n;
vector<ll>a(n);
for(ll i=0;i<n;i++) cin>>a[i];
cout<<solve(a);
return 0;
}
Meesho โ
using namespace std;
typedef long long ll;
ll solve(vector<ll>& arr)
{
unordered_map<ll,ll>freq;
for (auto it:arr)
{
freq[it]++;
}
vector<ll>un;
for (auto& it:freq)
{
un.push_back(it.first);
}
sort(un.begin(),un.end());
ll val=un[0],res=0,prev=0;
for(auto num:un)
{
if (num==val)
{
ll cur=(prev+1)*freq[num];
res=(res+cur);
prev=cur;
val++;
}
else
{
prev=freq[num];
res=(res+freq[num]);
val=num+1;
}
}
return res;
}
signed main() {
ll n; cin>>n;
vector<ll>a(n);
for(ll i=0;i<n;i++) cin>>a[i];
cout<<solve(a);
return 0;
}
Meesho โ
๐1