๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool solve(int power, const vector<int>& benches, const vector<int>& lampPosts) {
int n = benches.size();
int m = lampPosts.size();
int j = 0;
for (int i = 0; i < n; ++i) {
while (j < m && lampPosts[j] + power < benches[i]) {
++j;
}
if (j >= m || lampPosts[j] - power > benches[i]) {
return false;
}
}
return true;
}
int findMinPower(int numBenches, int numLampPosts, vector<int>& benches, vector<int>& lampPosts) {
sort(benches.begin(), benches.end());
sort(lampPosts.begin(), lampPosts.end());
int low = 0;
int high = max(benches.back(), lampPosts.back());
while (low < high) {
int mid = (low + high) / 2;
if (solve(mid, benches, lampPosts)) {
high = mid;
} else {
low = mid + 1;
}
}
return low;
}
illuminate the park
Sigmoidโ
long getMaximumEfficiency(vector<int> capacity, vector<int> numServers) {
int n = capacity.size();
int k = numServers.size();
sort(capacity.begin(), capacity.end());
sort(numServers.rbegin(), numServers.rend());
long maxEfficiency = 0;
int left = 0;
int right = n - 1;
for (int i = 0; i < k; i++) {
int batchSize = numServers[i];
int minCapacity = capacity[left];
int maxCapacity = capacity[right];
maxEfficiency += maxCapacity - minCapacity;
left += batchSize - 1;
right--;
}
return maxEfficiency;
}
DELL (Intern) โ
int n = capacity.size();
int k = numServers.size();
sort(capacity.begin(), capacity.end());
sort(numServers.rbegin(), numServers.rend());
long maxEfficiency = 0;
int left = 0;
int right = n - 1;
for (int i = 0; i < k; i++) {
int batchSize = numServers[i];
int minCapacity = capacity[left];
int maxCapacity = capacity[right];
maxEfficiency += maxCapacity - minCapacity;
left += batchSize - 1;
right--;
}
return maxEfficiency;
}
DELL (Intern) โ
function findMostEngagingPost(posts) {
let maxScore = -1;
let mostEngagingPostId = '';
posts.forEach(post => {
let score = post.likes * 2 + post.shares * 3 + post.comments;
if (score > maxScore || (score === maxScore && !mostEngagingPostId)) {
maxScore = score;
mostEngagingPostId = post.id;
}
});
return mostEngagingPostId;
}
DELL (Intern) โ
Social Media Post Analyzer
let maxScore = -1;
let mostEngagingPostId = '';
posts.forEach(post => {
let score = post.likes * 2 + post.shares * 3 + post.comments;
if (score > maxScore || (score === maxScore && !mostEngagingPostId)) {
maxScore = score;
mostEngagingPostId = post.id;
}
});
return mostEngagingPostId;
}
DELL (Intern) โ
Social Media Post Analyzer
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Ficode Software Solutions Private Limited
Role: DevOps Engineer
๐ Location: Mohali
๐๏ธ Working: 5 Days a week
๐ Employment Type: Full-Time
โ๏ธShare your Resume/CV at career@ficode.com
Role: DevOps Engineer
๐ Location: Mohali
๐๏ธ Working: 5 Days a week
๐ Employment Type: Full-Time
โ๏ธShare your Resume/CV at career@ficode.com
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int findKthHighestDiamonds(string houses, int M, int K) {
vector<int> diamondCounts;
int n = houses.size();
if (M > n) {
return -1;
}
int currentDiamonds = 0;
for (int i = 0; i < M; ++i) {
if (houses[i] == '1') {
currentDiamonds++;
}
}
diamondCounts.push_back(currentDiamonds);
for (int i = M; i < n; ++i) {
if (houses[i - M] == '1') {
currentDiamonds--;
}
if (houses[i] == '1') {
currentDiamonds++;
}
diamondCounts.push_back(currentDiamonds);
}
sort(diamondCounts.begin(), diamondCounts.end(), greater<int>());
if (K > diamondCounts.size()) {
return -1;
}
return diamondCounts[K - 1];
}
Dimaond Thief
Sigmoid โ
๐1
#include <iostream>
#include <string>
using namespace std;
char lastOneStanding(string S, int K) {
string concatenatedString = "";
for (int i = 0; i < K; i++) {
concatenatedString += S;
}
int removeFromStart = 1;
while (concatenatedString.length() > 1) {
string newString = "";
int len = concatenatedString.length();
if (removeFromStart) {
for (int i = 1; i < len; i += 2) {
newString += concatenatedString[i];
}
} else {
for (int i = len - 2; i >= 0; i -= 2) {
newString = concatenatedString[i] + newString;
}
}
concatenatedString = newString;
removeFromStart = 1 - removeFromStart;
}
return concatenatedString[0];
}
Last one standingโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
#Reshare
Naukri Campus Young Turks Skill Assessment Test
Your chance to showcase your skills in demand by employers by taking two tests.
Round 1: Basic Aptitude Test
Round 2: Skills Test in fields like coding & six other areas & earn merit certificates from top brands to enhance your CV, even win cash prizes, goodies up to Rs. 20,00,000!
Enroll Here: https://bit.ly/NaukriCampusTest
Naukri Campus Young Turks Skill Assessment Test
Your chance to showcase your skills in demand by employers by taking two tests.
Round 1: Basic Aptitude Test
Round 2: Skills Test in fields like coding & six other areas & earn merit certificates from top brands to enhance your CV, even win cash prizes, goodies up to Rs. 20,00,000!
Enroll Here: https://bit.ly/NaukriCampusTest
naukri.com
Naukri Campus Young Turks - Skills Assessment Test 2024 (SAT)
Prepare for career growth with the Young Turks Skills Assessment Test (SAT) 2024 by Naukri Campus. Boost your job interview skills with this aptitude test.
OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ
Google Hiring SDE Winter Internship Duration: 6 Months Batch : 2025 Apply: https://www.google.com/about/careers/applications/jobs/results/76016493501784774
Referral link :
https://docs.google.com/forms/d/1FHXs96OZkvTtLVjAROk176MVLN2XmeRhbaVZBSWoTvY/viewform?edit_requested=true
https://docs.google.com/forms/d/1FHXs96OZkvTtLVjAROk176MVLN2XmeRhbaVZBSWoTvY/viewform?edit_requested=true
Google Docs
Referral Form
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Zoomcar is hiring for Data Science Interns
2025/2024 batch passouts eligible
Send resume to : srushti.pathrut@zoomcar.com
2025/2024 batch passouts eligible
Send resume to : srushti.pathrut@zoomcar.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Exotel Hiring Software Engineer 1
Bachelor's or Master's degree in computer science or equivalent.
Experience:6 months -1 year
Good knowledge of one of the OOP languages: Golang (preferred) / PHP (preferred)/Java / Ruby / Python / C++
Good understanding of data structures, multi-threading and concurrency concepts.
Strong analytical and problem-solving skills.
Excellent written and verbal communication skills.
Team player, flexible and able to work in a fast-paced environment.
A "DevOps" mindset. You own what you will develop.
Good to Haves
Familiarity with 3-Tier, microservices architecture
Familiarity of RESTful services
Familiarity with developing Linux-based applications, networking and scripting
Familiarity with different data stores, data modelling, SQL & NoSQL databases
Familiarity with elastic search queries and visualization tools like grafana, kibana
Familiarity with networking fundamentals: Firewalls, Proxies, DNS, Load Balancing, etc.
Hiring Process:
1. Online Test
Comprising of four sections: Abstract Reasoning, Numeric Reasoning, Verbal Reasoning, and Hands-on Programming.
2. Tech Interview: Tech Round comprising of Data Structures & Algorithms
3. Hiring Manager Interview
4. HR Interview
https://exotel.com/careers/#op-638137-software-engineer1immediate-joiners-only
Bachelor's or Master's degree in computer science or equivalent.
Experience:6 months -1 year
Good knowledge of one of the OOP languages: Golang (preferred) / PHP (preferred)/Java / Ruby / Python / C++
Good understanding of data structures, multi-threading and concurrency concepts.
Strong analytical and problem-solving skills.
Excellent written and verbal communication skills.
Team player, flexible and able to work in a fast-paced environment.
A "DevOps" mindset. You own what you will develop.
Good to Haves
Familiarity with 3-Tier, microservices architecture
Familiarity of RESTful services
Familiarity with developing Linux-based applications, networking and scripting
Familiarity with different data stores, data modelling, SQL & NoSQL databases
Familiarity with elastic search queries and visualization tools like grafana, kibana
Familiarity with networking fundamentals: Firewalls, Proxies, DNS, Load Balancing, etc.
Hiring Process:
1. Online Test
Comprising of four sections: Abstract Reasoning, Numeric Reasoning, Verbal Reasoning, and Hands-on Programming.
2. Tech Interview: Tech Round comprising of Data Structures & Algorithms
3. Hiring Manager Interview
4. HR Interview
https://exotel.com/careers/#op-638137-software-engineer1immediate-joiners-only
Exotel
Careers
Don't find a job but find a career at Exotel. We believe in working with the absolute best and having fun while we do the best work of our lives.
๐3
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <unordered_map>
#include <string>
using namespace std;
void find_most_frequent_ngram(const string& S, int N) {
unordered_map<string, int> a;
int w = 0;
string d;
for (int i = 0; i <= S.length() - N; ++i) {
string ngram = S.substr(i, N);
a[ngram]++;
if (a[ngram] > w) {
w = a[ngram];
d = ngram;
}
}
cout << d << " " << w << endl;
}
int main() {
string input, S;
int N;
getline(cin, input);
size_t space_pos = input.find_last_of(' ');
S = input.substr(0, space_pos);
N = stoi(input.substr(space_pos + 1));
find_most_frequent_ngram(S, N);
return 0;
}
๐1๐ฅ1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
#include <iostream> #include <unordered_map> #include <string> using namespace std; void find_most_frequent_ngram(const string& S, int N) { unordered_map<string, int> a; int w = 0; string d; for (int i = 0; i <= S.length() - N; ++i) { โฆ
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
pair<string, int> findMostFrequentNGram(const string &s, int n) {
unordered_map<string, int> freqMap;
int length = s.size();
if (n > length) {
return {"", 0};
}
for (int i = 0; i <= length - n; ++i) {
string nGram = s.substr(i, n);
freqMap[nGram]++;
}
string mostFrequent;
int maxCount = 0;
// bool found = false;
for (int i = 0; i <= length - n; ++i) {
string nGram = s.substr(i, n);
if (freqMap[nGram] > maxCount) {
mostFrequent = nGram;
maxCount = freqMap[nGram];
// found = true;
}
}
return {mostFrequent, maxCount};
}
int main() {
string s = "abcabcabc";
int n = 3;
auto result = findMostFrequentNGram(s, n);
cout << "Most frequent " << n << "-gram: " << result.first << endl;
cout << "Frequency: " << result.second << endl;
return 0;
}
#include <string>
#include <unordered_map>
using namespace std;
pair<string, int> findMostFrequentNGram(const string &s, int n) {
unordered_map<string, int> freqMap;
int length = s.size();
if (n > length) {
return {"", 0};
}
for (int i = 0; i <= length - n; ++i) {
string nGram = s.substr(i, n);
freqMap[nGram]++;
}
string mostFrequent;
int maxCount = 0;
// bool found = false;
for (int i = 0; i <= length - n; ++i) {
string nGram = s.substr(i, n);
if (freqMap[nGram] > maxCount) {
mostFrequent = nGram;
maxCount = freqMap[nGram];
// found = true;
}
}
return {mostFrequent, maxCount};
}
int main() {
string s = "abcabcabc";
int n = 3;
auto result = findMostFrequentNGram(s, n);
cout << "Most frequent " << n << "-gram: " << result.first << endl;
cout << "Frequency: " << result.second << endl;
return 0;
}
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <queue>
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
int main() {
fastio;
int t = 1;
while (t--) {
int n;
cin >> n;
vector<int> v(n);
rep(i, n) cin >> v[i];
vector<int> sum(n + 1, 0);
for (int i = 0; i < n; ++i) {
sum[i + 1] = sum[i] + v[i];
}
int maximum = 0;
for (int i = 1; i <= n; ++i) {
maximum = max(maximum, (sum[i] + i - 1) / i);
}
int q;
cin >> q;
rep(i, q) {
int x;
cin >> x;
if (x < maximum) {
cout << -1 << endl;
} else {
cout << (sum[n] + x - 1) / x << endl;
}
}
}
return 0;
}
Rivertown sequence โ
โค1๐1