Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Lam Research hiring Engineering Intern
Batch eligible: 2025 grads
Apply: https://careers.lamresearch.com/job/Bangalore-Engineering-Intern-1-IN-B/1218002000/
Batch eligible: 2025 grads
Apply: https://careers.lamresearch.com/job/Bangalore-Engineering-Intern-1-IN-B/1218002000/
I am not sure if you guys are aware or not but there are many scammers in Telegram who may ask you to pay them 200 rs and will give 1250 after sometime, never ever reply to those fraud people. Never ever pay any money to anyone in telegram for the sake of getting it double or whatsoever.
Be smart, stay safe โค๏ธ
Be smart, stay safe โค๏ธ
#include <iostream>
#include <vector>
#include <unordered_map>
#include <set>
#include <algorithm>
using namespace std;
long long minimumCost(vector<int>& arr) {
unordered_map<int, int> freq;
for (int num : arr) {
freq[num]++;
}
vector<pair<int, int>> elements;
for (const auto& entry : freq) {
elements.push_back(entry);
}
sort(elements.begin(), elements.end(), [](pair<int, int>& a, pair<int, int>& b) {
return a.second > b.second;
});
set<int> distinct;
long long totalCost = 0;
for (const auto& element : elements) {
for (int i = 0; i < element.second; ++i) {
distinct.insert(element.first);
totalCost += distinct.size();
}
}
return totalCost;
}
IBM โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
public static int countHashtagDivisors(String description1, String description2) {
int len1 = description1.length();
int len2 = description2.length();
int gcdLength = gcd(len1, len2);
int commonDivisors = 0;
for (int i = 1; i <= gcdLength; i++) {
if (gcdLength % i == 0) {
String candidate = description1.substring(0, i);
if (isValidDivisor(description1, candidate) && isValidDivisor(description2, candidate)) {
commonDivisors++;
}
}
}
return commonDivisors;
}
public static int gcd(int a, int b) {
while (b != 0) {
int temp = b;
b = a % b;
a = temp;
}
return a;
}
public static boolean isValidDivisor(String description, String candidate) {
int len = description.length();
int candLen = candidate.length();
if (len % candLen != 0) return false;
StringBuilder repeated = new StringBuilder();
for (int i = 0; i < len / candLen; i++) {
repeated.append(candidate);
}
return repeated.toString().equals(description);
}
Hashtag divisor count โ
int len1 = description1.length();
int len2 = description2.length();
int gcdLength = gcd(len1, len2);
int commonDivisors = 0;
for (int i = 1; i <= gcdLength; i++) {
if (gcdLength % i == 0) {
String candidate = description1.substring(0, i);
if (isValidDivisor(description1, candidate) && isValidDivisor(description2, candidate)) {
commonDivisors++;
}
}
}
return commonDivisors;
}
public static int gcd(int a, int b) {
while (b != 0) {
int temp = b;
b = a % b;
a = temp;
}
return a;
}
public static boolean isValidDivisor(String description, String candidate) {
int len = description.length();
int candLen = candidate.length();
if (len % candLen != 0) return false;
StringBuilder repeated = new StringBuilder();
for (int i = 0; i < len / candLen; i++) {
repeated.append(candidate);
}
return repeated.toString().equals(description);
}
Hashtag divisor count โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
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?