#include <iostream>
#include <cmath>
#include <algorithm>
int solution(int M, int N) {
int total_area = 4 * N + M;
int x = static_cast<int>(:sqrt(total_area));
while (x > 0) {
int needed_tiles = x * x;
int max_2x2_tiles = (x / 2) * (x / 2);
if (needed_tiles <= 4 * min(N, max_2x2_tiles) + M) {
return x;
}
--x;
}
return 0;
}
Microsoft โ
Task 1
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
void addEdge(unordered_map<int, vector<pair<int, bool>>>& adj, int u, int v, bool direction) {
adj[u].emplace_back(v, direction);
adj[v].emplace_back(u, !direction);
}
int dfs(int node, unordered_map<int, vector<pair<int, bool>>>& adj, unordered_set<int>& visited) {
visited.insert(node);
int reorientCount = 0;
for (const auto& [neighbor, direction] : adj[node]) {
if (visited.find(neighbor) == visited.end()) {
if (direction) {
reorientCount++;
}
reorientCount += dfs(neighbor, adj, visited);
}
}
return reorientCount;
}
int solution(vector<int>& A, vector<int>& B, int N) {
unordered_map<int, vector<pair<int, bool>>> adj;
unordered_set<int> visited;
for (int i = 0; i < N; ++i) {
addEdge(adj, A[i], B[i], true);
}
return dfs(0, adj, visited);
}
Microsoft โ
Task 2
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
void addEdge(unordered_map<int, vector<pair<int, bool>>>& adj, int u, int v, bool direction) {
adj[u].emplace_back(v, direction);
adj[v].emplace_back(u, !direction);
}
int dfs(int node, unordered_map<int, vector<pair<int, bool>>>& adj, unordered_set<int>& visited) {
visited.insert(node);
int reorientCount = 0;
for (const auto& [neighbor, direction] : adj[node]) {
if (visited.find(neighbor) == visited.end()) {
if (direction) {
reorientCount++;
}
reorientCount += dfs(neighbor, adj, visited);
}
}
return reorientCount;
}
int solution(vector<int>& A, vector<int>& B, int N) {
unordered_map<int, vector<pair<int, bool>>> adj;
unordered_set<int> visited;
for (int i = 0; i < N; ++i) {
addEdge(adj, A[i], B[i], true);
}
return dfs(0, adj, visited);
}
Microsoft โ
Task 2
๐คฎ3๐2โค1
def minMoves(k1, k2, k3, eT, aT, mT):
n = k1 + k2 + k3
de = set(range(1, k1 + 1))
da = set(range(k1 + 1, k1 + k2 + 1))
dm = set(range(k1 + k2 + 1, n + 1))
eW = [0] * (n + 1)
aW = [0] * (n + 1)
mW = [0] * (n + 1)
for t in eT:
if t not in de:
eW[t] = 1
for t in aT:
if t not in da:
aW[t] = 1
for t in mT:
if t not in dm:
mW[t] = 1
pE = [0] * (n + 1)
pA = [0] * (n + 1)
pM = [0] * (n + 1)
for i in range(1, n + 1):
pE[i] = pE[i - 1] + eW[i]
pA[i] = pA[i - 1] + aW[i]
pM[i] = pM[i - 1] + mW[i]
minM = float('inf')
for i in range(n + 1):
movesEA = pE[i]
movesAM = pA[n] - pA[i]
movesME = pM[n]
totalM = movesEA + movesAM
minM = min(minM, totalM)
return minM
Titan (FTE) โ
๐2
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Amantya Technologies
Currently seeking a fresher C/C++ Developer to join our team in Gurgaon.
Hiring Process:
Candidates will need to complete a technical test and a technical interview at our Gurgaon office.
Please send your CV to pooja.jassy@amantyatech.com
Currently seeking a fresher C/C++ Developer to join our team in Gurgaon.
Hiring Process:
Candidates will need to complete a technical test and a technical interview at our Gurgaon office.
Please send your CV to pooja.jassy@amantyatech.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Send your resume
dowellhr@dowelltech.com
dowellhr@dowelltech.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : UKG
Batch : 2025 female students
Role : SDE Internship - 6 months
Stipend : 50,000 INR/month
Form link : https://docs.google.com/forms/d/e/1FAIpQLSdnhRqbFCCEzdAMrR-1uRVOat0Rr67ncYiiJ8N4w89XEaMixQ/viewform?pli=1
Last date to fill the form is October 21.
Batch : 2025 female students
Role : SDE Internship - 6 months
Stipend : 50,000 INR/month
Form link : https://docs.google.com/forms/d/e/1FAIpQLSdnhRqbFCCEzdAMrR-1uRVOat0Rr67ncYiiJ8N4w89XEaMixQ/viewform?pli=1
Last date to fill the form is October 21.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Check out this job at Axis Bank: https://www.linkedin.com/jobs/view/4049028200
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Shanti B. on LinkedIn: #vlsi #hcltech #hiring #pdtrainedfreshers #jobseekers #vlsigroupsโฆ | 24 comments
Hello #VLSI Family!!
We at #HCLtech #hiring #PDtrainedfreshers minimum 6 months training experience.
Location: Bangalore, Noida
Exp: 0-3 Years
If you areโฆ | 24 comments on LinkedIn
We at #HCLtech #hiring #PDtrainedfreshers minimum 6 months training experience.
Location: Bangalore, Noida
Exp: 0-3 Years
If you areโฆ | 24 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Mudit Rastogi on LinkedIn: #hiringnow #ai #generativeai #gan #llm #aiinternship #remoteworkโฆ | 83 comments
Weโre Hiring AI Interns โ Start Immediately!
Are you passionate about Generative AI and eager to dive into cutting-edge projects? We're looking forโฆ | 83 comments on LinkedIn
Are you passionate about Generative AI and eager to dive into cutting-edge projects? We're looking forโฆ | 83 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Meesho
Role: Android Developer
YOE: 2 months - 2 years in android development
If interested send your resume to: sheifali.singh@meesho.com
Role: Android Developer
YOE: 2 months - 2 years in android development
If interested send your resume to: sheifali.singh@meesho.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Cornerstone
Role: Associate Software Engineer
YOE: 2023 and 2024 grads
Apply: https://cornerstone.csod.com/ux/ats/careersite/2/home/requisition/9717?c=cornerstone
Role: Associate Software Engineer
YOE: 2023 and 2024 grads
Apply: https://cornerstone.csod.com/ux/ats/careersite/2/home/requisition/9717?c=cornerstone
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Lightcast is hiring Software Engineer
For 2021, 2022, 2023 grads
Location: Chennai
https://jobs.lever.co/economicmodeling/4016e3d8-8a90-42de-ab79-94ef16be0b1d/
For 2021, 2022, 2023 grads
Location: Chennai
https://jobs.lever.co/economicmodeling/4016e3d8-8a90-42de-ab79-94ef16be0b1d/
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Nestle
Nestinternship 2024
Batch : All college going students - core branches
Link : https://www.nestle.in/jobs/students-graduates/nesternship-internship-program
Nestinternship 2024
Batch : All college going students - core branches
Link : https://www.nestle.in/jobs/students-graduates/nesternship-internship-program
Nestlรฉ India
Nestlรฉ Internship Program
Jumpstart your career with Nestlรฉ's internship program. Gain hands-on experience and build skills with a global leader. Apply now for a Nesternship !
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int mod = 1e9 + 7;
int countWaysToCreateWave(vector<int> nums,int m){
int n = nums.size();
vector<ll> PrefixDP1(m+1,0) , PrefixDP2(m+1,0);
for(int i = n - 1 ; i >= 0 ; i--){
vector<ll> newDP1(m+1,0) , newDP2(m+1,0);
if(nums[i] == -1){
for(int ending = 1 ; ending <= m ; ending++){
(newDP1[ending] += i == n-1 ? ending != m : PrefixDP2[m] - PrefixDP2[ending] + mod) %= mod;
(newDP2[ending] += i == n-1 ? ending != 1 : PrefixDP1[ending-1] - PrefixDP1[0] + mod) %= mod;
}
}
else{
(newDP1[nums[i]] = i == n-1 ? nums[i] != m : PrefixDP2[m] - PrefixDP2[nums[i]] + mod) %= mod;
(newDP2[nums[i]] = i == n-1 ? nums[i] != 1 : PrefixDP1[nums[i]-1] - PrefixDP1[0] + mod) %= mod;
}
for(int ending = 1 ; ending <= m ; ending++){
PrefixDP1[ending] = (PrefixDP1[ending-1] + newDP1[ending]) % mod;
PrefixDP2[ending] = (PrefixDP2[ending-1] + newDP2[ending]) % mod;
}
}
return (PrefixDP1[m] + PrefixDP2[m]) % mod;
}
Movelnsync Application latency wave โ
using namespace std;
using ll = long long;
int mod = 1e9 + 7;
int countWaysToCreateWave(vector<int> nums,int m){
int n = nums.size();
vector<ll> PrefixDP1(m+1,0) , PrefixDP2(m+1,0);
for(int i = n - 1 ; i >= 0 ; i--){
vector<ll> newDP1(m+1,0) , newDP2(m+1,0);
if(nums[i] == -1){
for(int ending = 1 ; ending <= m ; ending++){
(newDP1[ending] += i == n-1 ? ending != m : PrefixDP2[m] - PrefixDP2[ending] + mod) %= mod;
(newDP2[ending] += i == n-1 ? ending != 1 : PrefixDP1[ending-1] - PrefixDP1[0] + mod) %= mod;
}
}
else{
(newDP1[nums[i]] = i == n-1 ? nums[i] != m : PrefixDP2[m] - PrefixDP2[nums[i]] + mod) %= mod;
(newDP2[nums[i]] = i == n-1 ? nums[i] != 1 : PrefixDP1[nums[i]-1] - PrefixDP1[0] + mod) %= mod;
}
for(int ending = 1 ; ending <= m ; ending++){
PrefixDP1[ending] = (PrefixDP1[ending-1] + newDP1[ending]) % mod;
PrefixDP2[ending] = (PrefixDP2[ending-1] + newDP2[ending]) % mod;
}
}
return (PrefixDP1[m] + PrefixDP2[m]) % mod;
}
Movelnsync Application latency wave โ