๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> solve(vector<int>& nums) {
vector<vector<int>> ans;
int n = nums.size();
sort(nums.begin(), nums.end());
for (int i = 0; i < n - 2; ++i) {
if (i > 0 && nums[i] == nums[i - 1])
continue;
int left = i + 1, right = n - 1;
while (left < right) {
int sum = nums[i] + nums[left] + nums[right];
if (sum == 0) {
ans.push_back({nums[i], nums[left], nums[right]});
while (left < right && nums[left] == nums[left + 1]) ++left;
while (left < right && nums[right] == nums[right - 1]) --right;
++left;
--right;
} else if (sum < 0) {
++left;
} else {
--right;
}
}
}
return ans;
}
The Quest for Numerias Relics โ
SELECT
a.iban,
ROUND(SUM(CASE WHEN EXTRACT(QUARTER FROM d.dt) = 1 THEN d.amount ELSE 0 END), 2) AS q1,
ROUND(SUM(CASE WHEN EXTRACT(QUARTER FROM d.dt) = 2 THEN d.amount ELSE 0 END), 2) AS q2,
ROUND(SUM(CASE WHEN EXTRACT(QUARTER FROM d.dt) = 3 THEN d.amount ELSE 0 END), 2) AS q3,
ROUND(SUM(CASE WHEN EXTRACT(QUARTER FROM d.dt) = 4 THEN d.amount ELSE 0 END), 2) AS q4,
ROUND(SUM(d.amount), 2) AS year2023
FROM
accounts a
LEFT JOIN
declarations d ON a.id = d.account_id
WHERE
EXTRACT(YEAR FROM d.dt) = 2023
GROUP BY
a.iban
ORDER BY
a.iban ASC;
Tax Software
Meeshoโ
SELECT
c.email,
COUNT(s.url) AS total_active_sites
FROM
customers c
LEFT JOIN
sites s ON c.id = s.customer_id AND s.is_active = 1
GROUP BY
c.email
ORDER BY
c.email ASC;
Web hosting service
Meeshoโ
SELECT
u.email,
COUNT(t.id) AS total_transactions,
ROUND(SUM(t.amount), 2) AS total_amount
FROM
users u
LEFT JOIN
transactions t ON u.id = t.user_id
WHERE
YEAR(t.dt) = 2023
GROUP BY
u.email
ORDER BY
u.email ASC;
Payment System
Meeshoโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
SDET Tech is hiring for SDE in Test
2022/2023 passouts
Apply Now :
https://forms.gle/2hZCAJHse7yJJ7YY9
2022/2023 passouts
Apply Now :
https://forms.gle/2hZCAJHse7yJJ7YY9
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
EYGDS is hiring for Junior Engineer
0 - 1 year experience
Skills : AWS / Azure , Linux , CI/CD
Send your resume : Shafwan.Saleem@gds.ey.com
0 - 1 year experience
Skills : AWS / Azure , Linux , CI/CD
Send your resume : Shafwan.Saleem@gds.ey.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Rupeek is hiring for SDE l - Android
2024/2023/2022 batches mainly ( before batches can also try )
Form Link :
https://forms.gle/imfRw7rZqnBAL6Lx5
2024/2023/2022 batches mainly ( before batches can also try )
Form Link :
https://forms.gle/imfRw7rZqnBAL6Lx5
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Zeta
Role : SDE1
Batch : 2023/2022 passouts
https://jobs.lever.co/zeta/8c8b68fc-cda5-4625-999f-e52773a8e76b
Role : SDE1
Batch : 2023/2022 passouts
https://jobs.lever.co/zeta/8c8b68fc-cda5-4625-999f-e52773a8e76b
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int checking(map<string, int>& dictone, int given) {
int c = 0;
for (auto it = dictone.begin(); it != dictone.end();) {
if (it->second > given) {
c++;
++it;
} else {
it = dictone.erase(it);
}
}
return c;
}
vector<int> getUnexpiredTokens(int time_to_live, vector<string>& queries) {
map<string, int> dictone;
vector<int> final;
for (string& one : queries) {
istringstream iss(one);
vector<string> tokens;
string token;
while (iss >> token) {
tokens.push_back(token);
}
if (tokens[0] == "generate") {
dictone[tokens[1]] = stoi(tokens[2]) + time_to_live;
} else if (tokens[0] == "renew") {
dictone[tokens[1]] = stoi(tokens[2]) + time_to_live;
} else if (tokens[0] == "count") {
int ans = checking(dictone, stoi(tokens[1]));
final.push_back(ans);
}
}
return final;
}
int c = 0;
for (auto it = dictone.begin(); it != dictone.end();) {
if (it->second > given) {
c++;
++it;
} else {
it = dictone.erase(it);
}
}
return c;
}
vector<int> getUnexpiredTokens(int time_to_live, vector<string>& queries) {
map<string, int> dictone;
vector<int> final;
for (string& one : queries) {
istringstream iss(one);
vector<string> tokens;
string token;
while (iss >> token) {
tokens.push_back(token);
}
if (tokens[0] == "generate") {
dictone[tokens[1]] = stoi(tokens[2]) + time_to_live;
} else if (tokens[0] == "renew") {
dictone[tokens[1]] = stoi(tokens[2]) + time_to_live;
} else if (tokens[0] == "count") {
int ans = checking(dictone, stoi(tokens[1]));
final.push_back(ans);
}
}
return final;
}
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int countWaveArrays(int n, vector<int>& arr, int m) {
vector<vector<vector<int>>> dp(n + 1, vector<vector<int>>(m + 1, vector<int>(2, 0)));
for (int j = 1; j <= m; ++j) {
if (arr[0] == -1 || arr[0] == j) {
dp[1][j][0] = 1;
dp[1][j][1] = 1;
}
}
for (int i = 2; i <= n; ++i) {
for (int j = 1; j <= m; ++j) {
if (arr[i - 1] == -1 || arr[i - 1] == j) {
int sumValley = 0;
for (int k = 1; k < j; ++k) {
sumValley = (sumValley + dp[i - 1][k][1]) % MOD;
}
dp[i][j][0] = sumValley;
int sumPeak = 0;
for (int k = j + 1; k <= m; ++k) {
sumPeak = (sumPeak + dp[i - 1][k][0]) % MOD;
}
dp[i][j][1] = sumPeak;
}
}
}
int result = 0;
for (int j = 1; j <= m; ++j) {
result = (result + dp[n][j][0]) % MOD;
result = (result + dp[n][j][1]) % MOD;
}
return result;
}
vector<vector<vector<int>>> dp(n + 1, vector<vector<int>>(m + 1, vector<int>(2, 0)));
for (int j = 1; j <= m; ++j) {
if (arr[0] == -1 || arr[0] == j) {
dp[1][j][0] = 1;
dp[1][j][1] = 1;
}
}
for (int i = 2; i <= n; ++i) {
for (int j = 1; j <= m; ++j) {
if (arr[i - 1] == -1 || arr[i - 1] == j) {
int sumValley = 0;
for (int k = 1; k < j; ++k) {
sumValley = (sumValley + dp[i - 1][k][1]) % MOD;
}
dp[i][j][0] = sumValley;
int sumPeak = 0;
for (int k = j + 1; k <= m; ++k) {
sumPeak = (sumPeak + dp[i - 1][k][0]) % MOD;
}
dp[i][j][1] = sumPeak;
}
}
}
int result = 0;
for (int j = 1; j <= m; ++j) {
result = (result + dp[n][j][0]) % MOD;
result = (result + dp[n][j][1]) % MOD;
}
return result;
}
๐2
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Akamai Technology
๐ Job Title: Software Engineer
โ๐ป YOE: 2022, 2023 and 2024 grads
โก๏ธ Apply: https://akamaicareers.inflightcloud.com/jobdetails/aka_ext/035283
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ
๐ Job Title: Software Engineer
โ๐ป YOE: 2022, 2023 and 2024 grads
โก๏ธ Apply: https://akamaicareers.inflightcloud.com/jobdetails/aka_ext/035283
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ
๐1
def shuffle_strings(instr1, instr2, innum):
outstr = ""
len1, len2 = len(instr1), len(instr2)
index1, index2 = 0, 0
while index1 < len1 or index2 < len2:
if index1 < len1:
outstr += instr1[index1:index1 + innum]
index1 += innum
if index2 < len2:
outstr += instr2[index2:index2 + innum]
index2 += innum
return outstr
instr1 = input().strip()
instr2 = input().strip()
innum = int(input().strip())
outstr = shuffle_strings(instr1, instr2, innum)
print(outstr)
outstr = ""
len1, len2 = len(instr1), len(instr2)
index1, index2 = 0, 0
while index1 < len1 or index2 < len2:
if index1 < len1:
outstr += instr1[index1:index1 + innum]
index1 += innum
if index2 < len2:
outstr += instr2[index2:index2 + innum]
index2 += innum
return outstr
instr1 = input().strip()
instr2 = input().strip()
innum = int(input().strip())
outstr = shuffle_strings(instr1, instr2, innum)
print(outstr)
๐1
def cache_query_handler(cache_entries, queries):
cache = {}
for entry in cache_entries:
timestamp, key, value = entry
if key not in cache:
cache[key] = {}
cache[key][timestamp] = value
result = []
for query in queries:
key, timestamp = query
if key in cache and timestamp in cache[key]:
result.append(cache[key][timestamp])
else:
result.append(None)
return result
cache = {}
for entry in cache_entries:
timestamp, key, value = entry
if key not in cache:
cache[key] = {}
cache[key][timestamp] = value
result = []
for query in queries:
key, timestamp = query
if key in cache and timestamp in cache[key]:
result.append(cache[key][timestamp])
else:
result.append(None)
return result
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Kaplan is looking for 2024 grads !
Software Engineer Intern at Bangalore Location
3 months intern opportunity with basic teck Stack knowledge
Apply Now :
https://docs.google.com/forms/d/1Syixdq-4ECY0XxPQgk6F0Br-NkexrdYVEl3uoKgaQEU/edit#responses
Software Engineer Intern at Bangalore Location
3 months intern opportunity with basic teck Stack knowledge
Apply Now :
https://docs.google.com/forms/d/1Syixdq-4ECY0XxPQgk6F0Br-NkexrdYVEl3uoKgaQEU/edit#responses
โค1๐1
SinglyLinkedListNode* condense(SinglyLinkedListNode* head) {
if (!head) return nullptr;
unordered_set<int> seen;
SinglyLinkedListNode* current = head;
SinglyLinkedListNode* prev = nullptr;
while (current) {
if (seen.find(current->data) != seen.end()) {
prev->next = current->next;
} else {
seen.insert(current->data);
prev = current;
}
current = current->next;
}
return head;
}
Ion โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
int numPlayers(int k, vector<int> scores) {
sort(scores.begin(), scores.end(), greater<int>());
int rank = 1, s = 1, i = 0;
int count = 0;
while(i < int(scores.size())) {
//cout << scores[i] << endl;
int temp = scores[i];
if(scores[i] == 0) {
i++;
continue;
}
scores[i] = i + 1;
int val = i + 1;
if((i + 1) <= k)
count++;
else
break;
i++;
while(i < int(scores.size()) && temp == scores[i]) {
scores[i] = scores[i - 1];
i++;
if(scores[i] <= k)
count++;
}
}
return count;
}
Ion โ
๐1