๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <cctype>
using namespace std;
string sanitize(string s) {
string result;
for (char c : s) {
if (isalnum(c)) {
result += tolower(c);
}
}
return result;
}
vector<string> generate_usernames(vector<string> names) {
unordered_map<string, int> username_count;
vector<string> usernames;
for (string full_name : names) {
vector<string> words;
string word;
for (char c : full_name) {
if (c == ' ') {
if (!word.empty()) words.push_back(word);
word = "";
} else {
word += c;
}
}
if (!word.empty()) words.push_back(word);
string given_name = sanitize(words[0]);
string family_name = sanitize(words.back());
string username = family_name.substr(0, min(7, (int)family_name.length()));
int remaining_len = 8 - username.length();
if (remaining_len > 0) {
username += given_name.substr(0, min(remaining_len, (int)given_name.length()));
}
string final_username = username;
int counter = 1;
while (username_count.find(final_username) != username_count.end()) {
if (final_username.length() < 8) {
final_username = username + to_string(counter);
} else {
final_username = username.substr(0, 7) + to_string(counter);
}
counter++;
}
username_count[final_username]++;
usernames.push_back(final_username);
}
return usernames;
}
Company Username โ
Squarepoint
public static int solution(int[] objects, int radius) {
int n = objects.length;
int maxIlluminated = 0;
int bestPosition = Integer.MAX_VALUE;
int left = 0;
for (int right = 0; right < n; right++) {
while (objects[right] - objects[left] > 2 * radius) {
left++;
}
int count = right - left + 1;
int candidatePosition = objects[right] - radius;
candidatePosition = Math.max(candidatePosition, objects[left]);
if (count > maxIlluminated) {
maxIlluminated = count;
bestPosition = candidatePosition;
} else if (count == maxIlluminated) {
bestPosition = Math.min(bestPosition, candidatePosition);
}
}
return bestPosition;
}
Coinbase (FTE) โ
int n = objects.length;
int maxIlluminated = 0;
int bestPosition = Integer.MAX_VALUE;
int left = 0;
for (int right = 0; right < n; right++) {
while (objects[right] - objects[left] > 2 * radius) {
left++;
}
int count = right - left + 1;
int candidatePosition = objects[right] - radius;
candidatePosition = Math.max(candidatePosition, objects[left]);
if (count > maxIlluminated) {
maxIlluminated = count;
bestPosition = candidatePosition;
} else if (count == maxIlluminated) {
bestPosition = Math.min(bestPosition, candidatePosition);
}
}
return bestPosition;
}
Coinbase (FTE) โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Software Engineer || Capgemini Exceller 2024-25
Capgemini ยท PAN India
https://app.joinsuperset.com/join/#/signup/student/jobprofiles/f5ddcff9-5635-47a8-bdff-2e11cb8e4bdd
Capgemini ยท PAN India
https://app.joinsuperset.com/join/#/signup/student/jobprofiles/f5ddcff9-5635-47a8-bdff-2e11cb8e4bdd
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Rajat Singhal on LinkedIn: #internship #microsoft #referral #job #softwareengineer #career #fresherโฆ | 144 comments
We are ๐ต๐ถ๐ฟ๐ถ๐ป๐ด for Research Fellowship 2025 @ Microsoft !!!
๐๐ป๐๐ฒ๐ฟ๐ป๐๐ต๐ถ๐ฝ ๐๐ฒ๐๐ฎ๐ถ๐น๐:
Job Role: Research Fellowship
Experience: Freshersโฆ | 144 comments on LinkedIn
๐๐ป๐๐ฒ๐ฟ๐ป๐๐ต๐ถ๐ฝ ๐๐ฒ๐๐ฎ๐ถ๐น๐:
Job Role: Research Fellowship
Experience: Freshersโฆ | 144 comments on LinkedIn
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
Python
Stripe โ
from typing import List
from collections import defaultdict
def parseNetworkChargebackInfo(rows: List[str]) -> List[str]:
currency_conversion = {
'EUR': 100, 'USD': 100, 'SGD': 100, 'BRL': 100,
'JPY': 1, 'ISK': 1, 'KRW': 1, 'CAD': 100
}
valid_disputes = []
withdrawn_disputes = defaultdict(dict)
transaction_dates = {}
for file_data in rows:
lines = file_data.split('\n')
file_info = lines[0].split('.')[0]
network, date = file_info.split('_')
headers = lines[1].split(',')
field_indices = {field: headers.index(field) for field in
['transaction', 'merchant', 'amount', 'currency', 'evidence_due_by', 'reason']}
for line in lines[2:]:
fields = line.split(',')
if len(fields) < len(headers):
continue
transaction_id = fields[field_indices['transaction']]
reason = fields[field_indices['reason']]
try:
amount = int(float(fields[field_indices['amount']]))
currency = fields[field_indices['currency']]
evidence_due_by = int(fields[field_indices['evidence_due_by']])
if currency not in currency_conversion or amount < 0 or evidence_due_by < 0:
continue
except (ValueError, KeyError):
continue
dispute_id = f"{network}{transaction_id}"
merchant_id = fields[field_indices['merchant']]
major_amount = amount / currency_conversion[currency]
formatted_value = f"{major_amount:.2f}{currency}"
if reason == 'withdrawn':
withdrawn_disputes[network][transaction_id] = date
else:
valid_disputes.append((dispute_id, merchant_id, formatted_value, evidence_due_by, date))
transaction_dates[transaction_id] = date
output = []
for dispute in valid_disputes:
dispute_id, merchant_id, value, due_by, date = dispute
network, transaction_id = dispute_id[:4], dispute_id[4:]
if transaction_id in withdrawn_disputes[network]:
if withdrawn_disputes[network][transaction_id] >= date:
continue
output.append(f"{dispute_id},{merchant_id},{value},{due_by}")
return sorted(output)
# Sample test case
rows = [
"VISA_20230601.csv\n"
"transaction,merchant,amount,currency,evidence_due_by,reason\n"
"123890132,47821,37906,USD,1686812400,fraudulent\n"
"110450953,63724,12750,JPY,1686898800,duplicate\n",
"JCB_20230604.csv\n"
"transaction,merchant,currency,amount,evidence_due_by,reason\n"
"110450953,11000,SGD,15000,1686898820,duplicate"
]
output = parseNetworkChargebackInfo(rows)
for line in output:
print(line)
Stripe โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def max_frame_sum(matrix, frameSize):
n, m = len(matrix), len(matrix[0])
max_sum = -1
elems = set()
for i in range(n - frameSize + 1):
for j in range(m - frameSize + 1):
s = 0
s += sum(matrix[i][j:j+frameSize]) + sum(matrix[i+frameSize-1][j:j+frameSize])
for k in range(i+1, i+frameSize-1):
s += matrix[k][j] + matrix[k][j+frameSize-1]
if s > max_sum:
max_sum = s
elems = set()
elems.update(matrix[i][j:j+frameSize])
elems.update(matrix[i+frameSize-1][j:j+frameSize])
for k in range(i+1, i+frameSize-1):
elems.add(matrix[k][j])
elems.add(matrix[k][j+frameSize-1])
elif s == max_sum:
elems.update(matrix[i][j:j+frameSize])
elems.update(matrix[i+frameSize-1][j:j+frameSize])
for k in range(i+1, i+frameSize-1):
elems.add(matrix[k][j])
elems.add(matrix[k][j+frameSize-1])
return sum(elems)
Coinbase(FTE)โ
9 hacks to boost your productivity:
1) Plan your day. Write everything on a physical paper.
2) Follow the 80/20 rule. 20% of your work will bring you 80% of the results.
3) Stop multitasking. Switching tasks significantly reduces your productivity.
4) Remove all distractions from your working environment.
5) When tried, take a nap.
6) Learn to say no, you will never have enough time if you say "yes" to everything.
7) Anything that can be done under 5 minutes. Do it at that instant.
8) Do that task that you hate first.
9) Set deadlines; the task will never be finished without deadlines.
1) Plan your day. Write everything on a physical paper.
2) Follow the 80/20 rule. 20% of your work will bring you 80% of the results.
3) Stop multitasking. Switching tasks significantly reduces your productivity.
4) Remove all distractions from your working environment.
5) When tried, take a nap.
6) Learn to say no, you will never have enough time if you say "yes" to everything.
7) Anything that can be done under 5 minutes. Do it at that instant.
8) Do that task that you hate first.
9) Set deadlines; the task will never be finished without deadlines.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Adobe Hiring UI frontend - SheSparks Intern
https://careers.adobe.com/us/en/job/ADOBUSR150415EXTERNALENUS/UI-Front-End-SheSparks-Intern?
https://careers.adobe.com/us/en/job/ADOBUSR150415EXTERNALENUS/UI-Front-End-SheSparks-Intern?
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Sushovan Jana on LinkedIn: #openings #cognizant #lateralhiring #fresher #hyderabad #walkin | 47 comments
Greetings from Cognizant! Walk-In Drive in Hyderabad!!
Openings for IOA CMT!
Interview Date: 03-10-2024(Face to Face)
Interview Time: 10:00 AM - 01:00โฆ | 47 comments on LinkedIn
Openings for IOA CMT!
Interview Date: 03-10-2024(Face to Face)
Interview Time: 10:00 AM - 01:00โฆ | 47 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Google Cloud is Hiring
0-2 YOE
https://www.google.com/about/careers/applications/jobs/results/113097906944123590
0-2 YOE
https://www.google.com/about/careers/applications/jobs/results/113097906944123590
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company: HackerRank
Batch: 2025
Role: SDE Intern
Apply:
https://boards.greenhouse.io/hackerrank/jobs/6241442?gh_jid=6241442
Batch: 2025
Role: SDE Intern
Apply:
https://boards.greenhouse.io/hackerrank/jobs/6241442?gh_jid=6241442
HackerRank
Careers - HackerRank
At HackerRank, people are the core of our mission. Weโre obsessed about the happiness and success of our customers, clients and โ above all โ our team.