ll solver(vll &grid,int n,int m, int row,int col){
ll cnt=1;
ll x1=1;
while(true){
if(row-x1>=0 and col-x1>=0 and row+x1<n and col+x1<m and grid[row-x1][col-x1]==1 and grid[row-x1][col+x1]==1 and grid[row+x1][col+x1] and grid[row+x1][col-x1]==1){
x1++;
cnt++;
}
else{
break;
}
}
return cnt;
}
int help(vll grid,int n,int m){
ll ans=0;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(grid[i][j]==1)
ans+=solver(grid,n,m,i,j);
}
}
return ans;
}
Coinbase โ
ll cnt=1;
ll x1=1;
while(true){
if(row-x1>=0 and col-x1>=0 and row+x1<n and col+x1<m and grid[row-x1][col-x1]==1 and grid[row-x1][col+x1]==1 and grid[row+x1][col+x1] and grid[row+x1][col-x1]==1){
x1++;
cnt++;
}
else{
break;
}
}
return cnt;
}
int help(vll grid,int n,int m){
ll ans=0;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(grid[i][j]==1)
ans+=solver(grid,n,m,i,j);
}
}
return ans;
}
Coinbase โ
def solution(state, operations):
n = len(state)
pq = []
for i in range(n):
if state[i] == 0:
heapq.heappush(pq, i)
for operation in operations:
if operation == "L":
if pq:
idx = heapq.heappop(pq)
state[idx] = 1
elif operation[0] == 'C':
index = int(operation[1:])
if state[index] == 1:
state[index] = 0
heapq.heappush(pq, index)
result = ''.join(map(str, state))
return result
Coinbase โ
n = len(state)
pq = []
for i in range(n):
if state[i] == 0:
heapq.heappush(pq, i)
for operation in operations:
if operation == "L":
if pq:
idx = heapq.heappop(pq)
state[idx] = 1
elif operation[0] == 'C':
index = int(operation[1:])
if state[index] == 1:
state[index] = 0
heapq.heappush(pq, index)
result = ''.join(map(str, state))
return result
Coinbase โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
pair<string, int> pL(const string& l) {
size_t sp = l.find(' ');
string n = l.substr(0, sp);
int t = stoi(l.substr(sp + 1));
return {n, t};
}
vector<string> sol(vector<vector<string>>& laps) {
unordered_map<string, int> bt;
vector<string> d;
vector<string> eo;
for (const string& l : laps[0]) {
auto [n, t] = pL(l);
bt[n] = t;
d.push_back(n);
}
for (const auto& lap : laps) {
for (const string& dl : lap) {
auto [n, t] = pL(dl);
bt[n] = min(bt[n], t);
}
int sT = 0;
for (const string& n : d) {
sT = max(sT, bt[n]);
}
vector<string> eD;
for (auto it = d.begin(); it != d.end();) {
if (bt[*it] == sT) {
eD.push_back(*it);
it = d.erase(it);
} else {
++it;
}
}
sort(eD.begin(), eD.end());
eo.insert(eo.end(), eD.begin(), eD.end());
}
return eo;
}
Coinbase โ
size_t sp = l.find(' ');
string n = l.substr(0, sp);
int t = stoi(l.substr(sp + 1));
return {n, t};
}
vector<string> sol(vector<vector<string>>& laps) {
unordered_map<string, int> bt;
vector<string> d;
vector<string> eo;
for (const string& l : laps[0]) {
auto [n, t] = pL(l);
bt[n] = t;
d.push_back(n);
}
for (const auto& lap : laps) {
for (const string& dl : lap) {
auto [n, t] = pL(dl);
bt[n] = min(bt[n], t);
}
int sT = 0;
for (const string& n : d) {
sT = max(sT, bt[n]);
}
vector<string> eD;
for (auto it = d.begin(); it != d.end();) {
if (bt[*it] == sT) {
eD.push_back(*it);
it = d.erase(it);
} else {
++it;
}
}
sort(eD.begin(), eD.end());
eo.insert(eo.end(), eD.begin(), eD.end());
}
return eo;
}
Coinbase โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int solution(vector<int>& readings, int k) {
unordered_set<int> powers;
if (k == 1) {
for (int reading : readings) {
if (reading == 1) {
powers.insert(1);
}
}
} else {
long long power = 1;
while (power <= *max_element(readings.begin(), readings.end())) {
powers.insert(power);
power *= k;
}
}
int count = 0;
for (int reading : readings) {
if (powers.count(reading)) {
count++;
}
}
return count;
}
Coinbase โ
string solution(vector<int>& numbers) {
int even_sum = 0, odd_sum = 0;
for (int i = 0; i < numbers.size(); ++i) {
if (i % 2 == 0) {
even_sum += numbers[i];
} else {
odd_sum += numbers[i];
}
}
if (even_sum > odd_sum) {
return "even";
} else if (odd_sum > even_sum) {
return "odd";
} else {
return "equal";
}
}
Coinbase โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
public class solve {
public static String[] solveCodes(String panel, String[] codes) {
int maxResultSize = codes.length * (codes[0].length() - 1);
String[] ans = new String[maxResultSize];
int ansIndex = 0;
for (String code : codes) {
int n = code.length();
for (int i = 1; i < n; i++) {
String indexStr = code.substring(0, i);
String pattern = code.substring(i);
int index = Integer.parseInt(indexStr);
if (index + pattern.length() <= panel.length()) {
String panelSubstr = panel.substring(index, index + pattern.length());
if (panelSubstr.equals(pattern)) {
ans[ansIndex++] = pattern;
} else {
ans[ansIndex++] = "not found";
}
} else {
ans[ansIndex++] = "not found";
}
}
}
String[] result = new String[ansIndex];
System.arraycopy(ans, 0, result, 0, ansIndex);
return result;
}
Coinbase โ
SELECT
v.venue_name,
COUNT(DISTINCT e.event_id) AS number_of_events,
ROUND(CAST(COUNT(r.registration_id) AS FLOAT) / NULLIF(COUNT(DISTINCT e.event_id), 0), 2) AS average_registrations
FROM
Venues v
JOIN Events e ON v.venue_id = e.venue_id
LEFT JOIN Registrations r ON e.event_id = r.event_id
WHERE
(SELECT COUNT(*) FROM Registrations r2 WHERE r2.event_id = e.event_id) > 0
AND (SELECT COUNT(*) FROM Registrations r2 WHERE r2.event_id = e.event_id) <= v.capacity
GROUP BY
v.venue_name
ORDER BY
average_registrations DESC,
v.venue_name ASC;
Meesho โ
โค1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐WEIR Hiring for Engineer Traniee
Location: Bangalore, Hybrid
Experience: 0 - 3 years
Qualifiactions:
- Candidate with 0-3 years of experience in Software development Fresh Graduate Engineer passed out of university in 2022 would be an ideal fit for this position.
- Educational Qualification: B.E/B.Tech in CS/IS/IT.
- Academic Score: Engineering CGPA 7.5 and above and 12th & 10th - 80%
- Good knowledge of software development using C# and .net core technologies.
- Good understanding API development using .net core, Azure Functions and Postman.
- Knowledge or experience on Azure Cloud will be a huge advantage.
๐ปApply: https://weir.wd3.myworkdayjobs.com/Weir_External_Careers/job/Bangalore/Engineer-Trainee---Digital_R0027003
Location: Bangalore, Hybrid
Experience: 0 - 3 years
Qualifiactions:
- Candidate with 0-3 years of experience in Software development Fresh Graduate Engineer passed out of university in 2022 would be an ideal fit for this position.
- Educational Qualification: B.E/B.Tech in CS/IS/IT.
- Academic Score: Engineering CGPA 7.5 and above and 12th & 10th - 80%
- Good knowledge of software development using C# and .net core technologies.
- Good understanding API development using .net core, Azure Functions and Postman.
- Knowledge or experience on Azure Cloud will be a huge advantage.
๐ปApply: https://weir.wd3.myworkdayjobs.com/Weir_External_Careers/job/Bangalore/Engineer-Trainee---Digital_R0027003
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Send Your Resume Here jobs@aimleap.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Yahoo is hiring Devops Engineer
For 2022, 2023, 2024 grads
Location: Remote
๐ปApply: https://ouryahoo.wd5.myworkdayjobs.com/en-US/careers/job/India---Remote/Production-Engineer_JR0022574?source=LinkedIn
For 2022, 2023, 2024 grads
Location: Remote
๐ปApply: https://ouryahoo.wd5.myworkdayjobs.com/en-US/careers/job/India---Remote/Production-Engineer_JR0022574?source=LinkedIn
Goldman Sachs Previous Year Questions Aptitude.
https://docs.google.com/document/d/1woSgjxZLTOMcWmqmYY-kbVyWSm2faKjfplZ24hEXTWk/edit?usp=sharing
https://docs.google.com/document/d/1woSgjxZLTOMcWmqmYY-kbVyWSm2faKjfplZ24hEXTWk/edit?usp=sharing
Google Docs
Goldman Sachs Previous Year Aptitude Questions
All the best to everyone, This sheet has been made by Arsh Goyal. For detailed Preparation strategy on Goldman Sachs , watch : https://youtu.be/XASgKT1Hh0I?si=vLBnUcIY-ATcydPw All the best <3 Goldman Sachs Section 1 : Numerical Computation 1.How manyโฆ
vector<string> solve(vector<vector<string>> p, vector<string> a, int w) {
vector<string> r;
r.push_back(string(w + 2, '*'));
for(int i = 0; i < p.size(); i++) {
string l = "";
for(string wd : p[i]) {
if(l.size() + wd.size() + (l.empty() ? 0 : 1) > w) {
if(a[i] == "LEFT") {
l += string(w - l.size(), ' ');
} else if(a[i] == "RIGHT") {
l = string(w - l.size(), ' ') + l;
}
r.push_back("*" + l + "*");
l = "";
}
if(!l.empty()) {
l += " ";
}
l += wd;
}
if(!l.empty()) {
if(a[i] == "LEFT") {
l += string(w - l.size(), ' ');
} else if(a[i] == "RIGHT") {
l = string(w - l.size(), ' ') + l;
}
r.push_back("*" + l + "*");
}
}
r.push_back(string(w + 2, '*'));
return r;
}
Coinbase โ
vector<string> r;
r.push_back(string(w + 2, '*'));
for(int i = 0; i < p.size(); i++) {
string l = "";
for(string wd : p[i]) {
if(l.size() + wd.size() + (l.empty() ? 0 : 1) > w) {
if(a[i] == "LEFT") {
l += string(w - l.size(), ' ');
} else if(a[i] == "RIGHT") {
l = string(w - l.size(), ' ') + l;
}
r.push_back("*" + l + "*");
l = "";
}
if(!l.empty()) {
l += " ";
}
l += wd;
}
if(!l.empty()) {
if(a[i] == "LEFT") {
l += string(w - l.size(), ' ');
} else if(a[i] == "RIGHT") {
l = string(w - l.size(), ' ') + l;
}
r.push_back("*" + l + "*");
}
}
r.push_back(string(w + 2, '*'));
return r;
}
Coinbase โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Email: career@genesistechnologies.in
WhatsApp: +91-8962827027, +91- 9644477797
๐ฏTo Register go to-
https://exam.genesisapps.in/register
๐ขOffice Location: https://lnkd.in/dgXEspfs
WhatsApp: +91-8962827027, +91- 9644477797
๐ฏTo Register go to-
https://exam.genesisapps.in/register
๐ขOffice Location: https://lnkd.in/dgXEspfs
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Accenture Mass Hiring
๐ฏAccenture Innovation Challenge
Graduation Year: 2025 / 2026 / 2027 / 2028
๐Eligibility:
Accenture Innovation Challenge 2024 is open to undergraduate and postgraduate students (currently full-time students) of all years across all institutes in India
Roles Offered:
1.โ โ Associate Software Engineer - 4.6 LPA
2.โ โ System and Application Services Associate - 3.5 LPA
๐ปApply Now: https://vision.hack2skill.com/event/aic2024/
๐ฏAccenture Innovation Challenge
Graduation Year: 2025 / 2026 / 2027 / 2028
๐Eligibility:
Accenture Innovation Challenge 2024 is open to undergraduate and postgraduate students (currently full-time students) of all years across all institutes in India
Roles Offered:
1.โ โ Associate Software Engineer - 4.6 LPA
2.โ โ System and Application Services Associate - 3.5 LPA
๐ปApply Now: https://vision.hack2skill.com/event/aic2024/