๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
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
vector<int> solution(vector<int> numbers) {
if (numbers.size() < 2) return numbers;
vector<int> f = {numbers[0]}, s = {numbers[1]};
for (int i = 2; i < numbers.size(); ++i) {
int cf = 0, cs = 0;
for (int x : f) cf += x > numbers[i];
for (int x : s) cs += x > numbers[i];
if (cf > cs || (cf == cs && f.size() <= s.size())) {
f.push_back(numbers[i]);
} else {
s.push_back(numbers[i]);
}
}
f.insert(f.end(), s.begin(), s.end());
return f;
}
Visa โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Fractal is hiring for Data Engineer (AWS + Python Developer)
Experience: 0 - 3 years
Expected Salary: 10-16 LPA
Apply here:
https://fractal.wd1.myworkdayjobs.com/Careers/job/Bengaluru/Data-Engineer--AWS---Python-Developer-_SR-26409
Experience: 0 - 3 years
Expected Salary: 10-16 LPA
Apply here:
https://fractal.wd1.myworkdayjobs.com/Careers/job/Bengaluru/Data-Engineer--AWS---Python-Developer-_SR-26409
Myworkdayjobs
AWS Data Engineer
It's fun to work in a company where people truly BELIEVE in what they are doing! We're committed to bringing passion and customer focus to the business. Job Profile - Senior Engineer AWS cloud Exp - 6-10 years Job Location โ Bangalore Responsibilities: Asโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Liven is hiring for Junior Data Engineer (Remote)
Experience: 0 - 1 years
Expected Salary: 7 - 14 LPA
Apply here: https://ats.rippling.com/liven/jobs/65a9816d-7b41-4a1a-ad7c-0226766276e1?jobSite=LinkedIn
Experience: 0 - 1 years
Expected Salary: 7 - 14 LPA
Apply here: https://ats.rippling.com/liven/jobs/65a9816d-7b41-4a1a-ad7c-0226766276e1?jobSite=LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Zuno is hiring for Campus Ambassador Program
Location: Remote
Apply Link: https://forms.gle/L7iexyjPDhf44fLD7
Referral/ Enrollment No:
Good opportunity for college students
Location: Remote
Apply Link: https://forms.gle/L7iexyjPDhf44fLD7
Referral/ Enrollment No:
ZW1212
Good opportunity for college students
Google Docs
Zuno by foundit || Campus Program
Hello there,
Welcome to Zuno by foundit. You are one step away from joining India's most popular platform for internships and fresher jobs.
This is your moment to shine on your campus. Represent us and receive exclusive benefits and rewards.
Please provideโฆ
Welcome to Zuno by foundit. You are one step away from joining India's most popular platform for internships and fresher jobs.
This is your moment to shine on your campus. Represent us and receive exclusive benefits and rewards.
Please provideโฆ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def go(bubbles, col, row):
n = len(bubbles)
row = min(row, n - 1)
t = row
for i in range(row, -1, -1):
if bubbles[i][col] != 0:
bubbles[t][col] = bubbles[i][col]
t -= 1
for i in range(t, -1, -1):
bubbles[i][col] = 0
def solution(bubbles):
m, n = len(bubbles), len(bubbles[0])
dx, dy = [-1, 0, 1, 0], [0, 1, 0, -1]
to_explode = set()
for x in range(m):
for y in range(n):
if bubbles[x][y] == 0:
continue
c = 0
color = bubbles[x][y]
for d in range(4):
xx, yy = x + dx[d], y + dy[d]
if 0 <= xx < m and 0 <= yy < n and bubbles[xx][yy] == color:
c += 1
if c >= 2:
to_explode.add((x, y))
for d in range(4):
xx, yy = x + dx[d], y + dy[d]
if 0 <= xx < m and 0 <= yy < n and bubbles[xx][yy] == color:
to_explode.add((xx, yy))
for x, y in to_explode:
bubbles[x][y] = 0
for y in range(n):
go(bubbles, y, m - 1)
return bubbles
Visa โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://tally.so/r/wzZ9kE
Raja Software Labs (RSL) is a product engineering company helping clients ship high volume, high impact products used by millions of users. Some of their recent clients include LinkedIn, Google Nest, TruePill, StubHub, Vida Health, CocoTerra, etc.
Eligibility:
Degree: BTech/BE, MTech/ MSc
Graduation Year: 2020/2021/2022/2023/2024.
Branch: All branches
20+ SDE Positions are OPEN:
Mandatory Skills: Any One (C, C++, Java, Python, JavaScript, or any other)
Preferred Skills: Knowledge of data structures, algorithms, and OOPs concepts.
Selection Process:
1๏ธโฃ Assessment at AccioJob Noida Skill Centre (Noida Sector 15)
2๏ธโฃ Three Online Interviews with RSL hiring team
Details:
๐ข CTC: 7 LPA
๐ Work Location: Pune (Work from Office)
Please bring your laptop for the test.
Round 1 Location: AccioJob Noida Skill Centre: https://maps.app.goo.gl/c3dfcuogCT3Rdn7d9
Contact: Ajay Khemarya at 9319757228
Raja Software Labs (RSL) is a product engineering company helping clients ship high volume, high impact products used by millions of users. Some of their recent clients include LinkedIn, Google Nest, TruePill, StubHub, Vida Health, CocoTerra, etc.
Eligibility:
Degree: BTech/BE, MTech/ MSc
Graduation Year: 2020/2021/2022/2023/2024.
Branch: All branches
20+ SDE Positions are OPEN:
Mandatory Skills: Any One (C, C++, Java, Python, JavaScript, or any other)
Preferred Skills: Knowledge of data structures, algorithms, and OOPs concepts.
Selection Process:
1๏ธโฃ Assessment at AccioJob Noida Skill Centre (Noida Sector 15)
2๏ธโฃ Three Online Interviews with RSL hiring team
Details:
๐ข CTC: 7 LPA
๐ Work Location: Pune (Work from Office)
Please bring your laptop for the test.
Round 1 Location: AccioJob Noida Skill Centre: https://maps.app.goo.gl/c3dfcuogCT3Rdn7d9
Contact: Ajay Khemarya at 9319757228
Tally Forms
Hi there,
We are no longer accepting applications for this drive, however, we have regular job drives with our 450+ partner companies. Join our Whatsapp Community to stay updated: https://chat.whatsapp.com/KFDZSnuUOBfHbRO5SyhaBK
โค1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Tcs back with balle balle opening
Tcs codevita
Eligible batch
2024,2025,2026,2027
https://codevita.tcsapps.com/
Tcs codevita
Eligible batch
2024,2025,2026,2027
https://codevita.tcsapps.com/
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Parallel Wireless
Role: Trainee
Batch eligible: 2023 and 2024 grads
Apply: https://jobs.lever.co/parallelwireless/d3f16e94-5398-46fa-b9cd-982a2d0e0a60/
Role: Trainee
Batch eligible: 2023 and 2024 grads
Apply: https://jobs.lever.co/parallelwireless/d3f16e94-5398-46fa-b9cd-982a2d0e0a60/
long maxScoreAfterKOperations(vector<int>& arr, int k) {
priority_queue<int> maxHeap(arr.begin(), arr.end());
long q = 0;
for (int i = 0; i < k; ++i) {
long maxElement = maxHeap.top();
maxHeap.pop();
q += maxElement;
long newElement = ceil(maxElement / 3.0);
maxHeap.push(newElement);
}
return q;
}
Maximum Score โ
HP(FTE)