๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
public class BobMathTeacher {
private static int gcd(int a, int b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
public static int max_balls(int N, int[] marks) {
if (N == 1) {
return marks[0];
}
int[] prefixGCD = new int[N];
int[] suffixGCD = new int[N];
prefixGCD[0] = marks[0];
for (int i = 1; i < N; i++) {
prefixGCD[i] = gcd(prefixGCD[i - 1], marks[i]);
}
suffixGCD[N - 1] = marks[N - 1];
for (int i = N - 2; i >= 0; i--) {
suffixGCD[i] = gcd(suffixGCD[i + 1], marks[i]);
}
int maxGCD = 0;
for (int i = 0; i < N; i++) {
int gcdWithoutI;
if (i == 0) {
gcdWithoutI = suffixGCD[1];
} else if (i == N - 1) {
gcdWithoutI = prefixGCD[N - 2];
} else {
gcdWithoutI = gcd(prefixGCD[i - 1], suffixGCD[i + 1]);
}
maxGCD = Math.max(maxGCD, gcdWithoutI);
}
return maxGCD;
}
Maximum Balls โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Office
Please fill out this form
โค1๐1
#include <iostream>
#include <bitset>
#include <string>
using namespace std;
bool ss(const string& binaryStr) {
return binaryStr.find("00") == string::npos;
}
int main() {
int m, n;
cin >> m >> n;
if (m > 0 && n > 0 && n > m + 1) {
for (int i = m + 1; i < n; ++i) {
string a = bitset<32>(i).to_string();
a = a.substr(a.find('1'));
if (ss(a)) {
cout << a << endl;
}
}
} else {
cout << "Invalid input: ensure m, n > 0 and there is at least one integer between m and n." << endl;
}
return 0;
}
Deloitte โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
CRED is hiring through Codechef Starter Contest
Batch eligible: 2024 and 2025 grads
Apply: https://www.codechef.com/START152
Batch eligible: 2024 and 2025 grads
Apply: https://www.codechef.com/START152
#include<bits/stdc++.h>
using namespace std;
vector<int> solution(int N, int K, vector<int> seat) {
set<int> availableSeats;
for (int i = 1; i <= N; ++i) {
availableSeats.insert(i);
}
vector<int> result;
for (int i = 0; i < K; ++i) {
if (seat[i] == 0) {
int reservedSeat = *availableSeats.begin();
availableSeats.erase(availableSeats.begin());
result.push_back(reservedSeat);
} else {
availableSeats.insert(seat[i]);
}
}
return result;
}
Sirion โ
using namespace std;
vector<int> solution(int N, int K, vector<int> seat) {
set<int> availableSeats;
for (int i = 1; i <= N; ++i) {
availableSeats.insert(i);
}
vector<int> result;
for (int i = 0; i < K; ++i) {
if (seat[i] == 0) {
int reservedSeat = *availableSeats.begin();
availableSeats.erase(availableSeats.begin());
result.push_back(reservedSeat);
} else {
availableSeats.insert(seat[i]);
}
}
return result;
}
Sirion โ
from itertools import permutations as perm
def get_permutations(s):
digits = sorted([ch for ch in s if ch.isdigit()])
letters = sorted([ch for ch in s if ch.isalpha()])
if not digits:
return
results = set()
for p in perm(letters):
results.add(''.join(digits) + ''.join(p))
for i in sorted(results):
print(i, end=" ")
Tesco โ
โค2
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
vector<bool> primes;
void sieve(int n) {
primes.resize(n + 1, true);
primes[0] = primes[1] = false;
for (int i = 2; i * i <= n; i++) {
if (primes[i]) {
for (int j = i * i; j <= n; j += i) {
primes[j] = false;
}
}
}
}
int main() {
int N, K;
cin >> N >> K;
sieve(1000000);
vector<int> result;
for (int num = 2; num <= 1000000 && N > 0; num++) {
if (primes[num] && num % 10 == K) {
result.push_back(num);
N--;
}
}
result.push_back(2);
result.push_back(5);
sort(result.begin(), result.end());
for (int num : result) {
cout << num << " ";
}
cout << endl;
return 0;
}
Tesco โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
from collections import deque
class Node:
def __init__(self, key):
self.data = key
self.left = None
self.right = None
def insert_level_order(arr, root, i, n):
if i < n:
temp = Node(arr[i])
root = temp
root.left = insert_level_order(arr, root.left, 2 * i + 1, n)
root.right = insert_level_order(arr, root.right, 2 * i + 2, n)
return root
def level_with_highest_odd_sum(root):
if not root:
return 0
queue = deque([root])
level = 1
max_odd_sum = -1
max_odd_level = 0
current_level = 1
while queue:
level_size = len(queue)
odd_sum = 0
for _ in range(level_size):
node = queue.popleft()
if node.data % 2 != 0:
odd_sum += node.data
if node.left:
queue.append(node.left)
if node.right:
queue.append(node.right)
if odd_sum > max_odd_sum:
max_odd_sum = odd_sum
max_odd_level = current_level
current_level += 1
return max_odd_level
if __name__ == "__main__":
N = int(input())
elements = list(map(int, input().split()))
root = None
root = insert_level_order(elements, root, 0, N)
result = level_with_highest_odd_sum(root)
print(result)
Tesco โ
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <queue>
#include <climits>
using namespace std;
struct Edge {
int dest, weight;
};
vector<int> dijkstra(int start, int N, vector<vector<Edge>>& adj, int totalMoney) {
vector<int> dist(N + 1, INT_MAX);
vector<int> parent(N + 1, -1);
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
dist[start] = 0;
pq.push({0, start});
while (!pq.empty()) {
int curNode = pq.top().second;
int curDist = pq.top().first;
pq.pop();
if (curDist > dist[curNode]) continue;
for (Edge edge : adj[curNode]) {
int nextNode = edge.dest;
int nextDist = curDist + edge.weight;
if (nextDist < dist[nextNode] && nextDist * 2 <= totalMoney) {
dist[nextNode] = nextDist;
parent[nextNode] = curNode;
pq.push({nextDist, nextNode});
}
}
}
return parent;
}
void printPath(int node, vector<int>& parent) {
if (parent[node] == -1) {
cout << node << " ";
return;
}
printPath(parent[node], parent);
cout << node << " ";
}
int main() {
int N, M, totalMoney;
cin >> N >> M >> totalMoney;
vector<vector<Edge>> adj(N + 1);
for (int i = 0; i < M; ++i) {
int u, v, w;
cin >> u >> v >> w;
adj[u].push_back({v, w});
adj[v].push_back({u, w});
}
vector<int> parent = dijkstra(1, N, adj, totalMoney);
int farthestNode = 1;
for (int i = 1; i <= N; ++i) {
if (parent[i] != -1 && i != 1) {
farthestNode = i;
}
}
printPath(farthestNode, parent);
while (farthestNode != 1) {
farthestNode = parent[farthestNode];
cout << farthestNode << " ";
}
return 0;
}
Tesco โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Google Docs
Zidio Internship Application Form
Thank you for your interest in the internship opportunities at Zidio. We are excited to learn more about you! Please fill out this form to apply for our internship program. All the information's will be kept confidential.
Important Details:
Apply by: 20thโฆ
Important Details:
Apply by: 20thโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Workable
Fresher - developer role - Bahwan Cybertek Group
As a fresher developer in computer science, your primary responsibility will be to contribute to software development projects by writing clean, efficient, and maintainable code according to specified requirements and design documents.You will actively...
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Tata 1mg is hiring SDE
Batch: 2021, 2022, 2023 grads
Location: Gurugram
Apply here:
https://1mg.darwinbox.in/ms/candidate/careers/a66dee9c60969e
Batch: 2021, 2022, 2023 grads
Location: Gurugram
Apply here:
https://1mg.darwinbox.in/ms/candidate/careers/a66dee9c60969e
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐ResultsCX is hiring for Software Quality Assurance Engineer
Experience: 0 - 1 year's
Expected Salary: 5-10 LPA
Apply here: https://careers.resultscx.com/job-detail/software-quality-assurance-engineer-25602347?sType=LIJobSlot
Experience: 0 - 1 year's
Expected Salary: 5-10 LPA
Apply here: https://careers.resultscx.com/job-detail/software-quality-assurance-engineer-25602347?sType=LIJobSlot
ResultsCX
Software Quality Assurance Engineer Job in Bengaluru, Karnataka | #25602347 #ResultsCX
ResultsCX is hiring a Software Quality Assurance Engineer in Bengaluru, Karnataka. Read the job description and apply today to job #25602347.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Chargebee is hiring for Software Engineer
Experience: 0 - 3 year's
Expected Salary: 12-16 LPA
Apply here: https://www.linkedin.com/jobs/view/4026464743/?alternateChannel=search
Experience: 0 - 3 year's
Expected Salary: 12-16 LPA
Apply here: https://www.linkedin.com/jobs/view/4026464743/?alternateChannel=search
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Company: SumaSoft
Role: Software Tester
Exp: 0-6 Months(Fresher) Immediate Joiner
Job Location: Pune / Aundh
For Software Tester Skill Required, #Testing #Python #Manual Testing #Automation testing #SQL
Must: Excellent Communication Skill.
โ๏ธShare an email on
snehal.mane@sumasoft.net
Role: Software Tester
Exp: 0-6 Months(Fresher) Immediate Joiner
Job Location: Pune / Aundh
For Software Tester Skill Required, #Testing #Python #Manual Testing #Automation testing #SQL
Must: Excellent Communication Skill.
โ๏ธShare an email on
snehal.mane@sumasoft.net
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Criteria - Freshers / B.E., B.Tech, MCA/2023 & 2024 passout
โข Full Stack Developer (0-3 years Experienced .NET/SQL & Angular/React)
โข Data Analyst / Data Engineer (0-3 years Experienced)
โข Software Developer Freshers
๐ขAddress: Office No 501, 5th Floor, CityAvenue - By Kolte Patil Mumbai-Bangalore By Pass, near Hotel Sayaji, Wakad, Pune, Maharashtra 411057
โข Full Stack Developer (0-3 years Experienced .NET/SQL & Angular/React)
โข Data Analyst / Data Engineer (0-3 years Experienced)
โข Software Developer Freshers
๐ขAddress: Office No 501, 5th Floor, CityAvenue - By Kolte Patil Mumbai-Bangalore By Pass, near Hotel Sayaji, Wakad, Pune, Maharashtra 411057