Which of the statement(s) given below is/are correct?
1)Routers can be static or dynamic
2)Routers connect two or more separate networks,
Ans) both 1 and 2
@allcoding1_official
1)Routers can be static or dynamic
2)Routers connect two or more separate networks,
Ans) both 1 and 2
@allcoding1_official
X(1), (2)
int count;
// Line 1
Antint i) { count 1)
int getcount () {return count)
// Line 5
public class Book
public static void main(String[] args)
System.out.println(AB.X.count + AB.Y.count); // Line 10
Ans)Compile time error at "// Line 10"
@allcoding1_official
int count;
// Line 1
Antint i) { count 1)
int getcount () {return count)
// Line 5
public class Book
public static void main(String[] args)
System.out.println(AB.X.count + AB.Y.count); // Line 10
Ans)Compile time error at "// Line 10"
@allcoding1_official
👍2
allcoding1_official
Photo
class TreeNode:
def init(self, val):
self.val = val
self.children = []
def build_tree(units, relationships):
nodes = {i: TreeNode(units[i]) for i in range(len(units))}
for rel in relationships:
parent, child = rel
nodes[parent].children.append(nodes[child])
return nodes[0]
def max_electricity_per_floor(root):
max_electricity = 0
floor_electricity = {}
def dfs(node, level):
nonlocal max_electricity
if level not in floor_electricity:
floor_electricity[level] = 0
floor_electricity[level] += node.val
max_electricity = max(max_electricity, floor_electricity[level])
for child in node.children:
dfs(child, level + 1)
dfs(root, 0)
return max_electricity
num = int(input())
units = list(map(int, input().split()))
numRel, memConnect = map(int, input().split())
relationships = [tuple(map(int, input().split())) for _ in range(numRel)]
root = build_tree(units, relationships)
result = max_electricity_per_floor(root)
print(result)
Apartment one
@allcoding1_official
def init(self, val):
self.val = val
self.children = []
def build_tree(units, relationships):
nodes = {i: TreeNode(units[i]) for i in range(len(units))}
for rel in relationships:
parent, child = rel
nodes[parent].children.append(nodes[child])
return nodes[0]
def max_electricity_per_floor(root):
max_electricity = 0
floor_electricity = {}
def dfs(node, level):
nonlocal max_electricity
if level not in floor_electricity:
floor_electricity[level] = 0
floor_electricity[level] += node.val
max_electricity = max(max_electricity, floor_electricity[level])
for child in node.children:
dfs(child, level + 1)
dfs(root, 0)
return max_electricity
num = int(input())
units = list(map(int, input().split()))
numRel, memConnect = map(int, input().split())
relationships = [tuple(map(int, input().split())) for _ in range(numRel)]
root = build_tree(units, relationships)
result = max_electricity_per_floor(root)
print(result)
Apartment one
@allcoding1_official
👍4
int main() {
ll N;
cin >> N;
vector<ll> w(N);
for(ll i = 0; i < N; ++i) {
cin >> w[i];
}
vector<ll> s(N, 15);
for(ll i = N-2; i >= 0; --i) {
for(ll j = i+1; j < N; ++j) {
if(w[i] < w[j]) {
s[i] = 10;
for(ll k = j+1; k < N; ++k) {
if(w[j] > w[k]) {
s[i] = 5;
break;
}
}
break;
}
}
}
ll g = 0;
for(ll sc : s) {
g += sc;
}
cout << g << endl;
return 0;
}
chair manufacture
@allcoding1_official
ll N;
cin >> N;
vector<ll> w(N);
for(ll i = 0; i < N; ++i) {
cin >> w[i];
}
vector<ll> s(N, 15);
for(ll i = N-2; i >= 0; --i) {
for(ll j = i+1; j < N; ++j) {
if(w[i] < w[j]) {
s[i] = 10;
for(ll k = j+1; k < N; ++k) {
if(w[j] > w[k]) {
s[i] = 5;
break;
}
}
break;
}
}
}
ll g = 0;
for(ll sc : s) {
g += sc;
}
cout << g << endl;
return 0;
}
chair manufacture
@allcoding1_official
👍2
int main() {
ll N;
cin >> N;
vector<ll> u(N);
for(ll i = 0; i < N; ++i) {
cin >> u[i];
}
ll M, X;
cin >> M >> X;
vector<vector<ll>> a(N);
for(ll i = 0; i < M; ++i) {
ll x, y;
cin >> x >> y;
a[x].push_back(y);
a[y].push_back(x);
}
vector<bool> v(N, false);
queue<ll> q;
q.push(0);
v[0] = true;
ll m = 0;
while(!q.empty()) {
ll s = q.size();
ll us = 0;
for(ll i = 0; i < s; ++i) {
ll n = q.front();
q.pop();
us += u[n];
for(ll nb : a[n]) {
if(!v[nb]) {
q.push(nb);
v[nb] = true;
}
}
}
m = max(m, us);
}
cout << m << endl;
return 0;
}
apartment
@allcoding1_official
ll N;
cin >> N;
vector<ll> u(N);
for(ll i = 0; i < N; ++i) {
cin >> u[i];
}
ll M, X;
cin >> M >> X;
vector<vector<ll>> a(N);
for(ll i = 0; i < M; ++i) {
ll x, y;
cin >> x >> y;
a[x].push_back(y);
a[y].push_back(x);
}
vector<bool> v(N, false);
queue<ll> q;
q.push(0);
v[0] = true;
ll m = 0;
while(!q.empty()) {
ll s = q.size();
ll us = 0;
for(ll i = 0; i < s; ++i) {
ll n = q.front();
q.pop();
us += u[n];
for(ll nb : a[n]) {
if(!v[nb]) {
q.push(nb);
v[nb] = true;
}
}
}
m = max(m, us);
}
cout << m << endl;
return 0;
}
apartment
@allcoding1_official
👍1
if not intervals:
return 0
intervals.sort(key=lambda x: x[0]) # Sort intervals based on start points
merged_intervals = [intervals[0]] # Initialize merged intervals with the first interval
for interval in intervals[1:]:
prev_interval = merged_intervals[-1]
if interval[0] <= prev_interval[1]: # If overlapping with previous interval
prev_interval[1] = max(prev_interval[1], interval[1]) # Merge intervals
else:
merged_intervals.append(interval) # Add non-overlapping interval
total_length = sum(end - start for start, end in merged_intervals)
return total_length
# Example usage:
intervals = [(1, 3), (2, 6), (8, 10), (15, 18)]
total_length_covered = merge_intervals(intervals)
print("Total length covered after merging overlapping intervals:", total_length_covered)
👍5
Forwarded from allcoding1_official
Forwarded from allcoding1_official
🎯Atos Is Hiring
Degree:- Any Graduate
Batch:- 2019, 2020, 2021, 2022, 2023 & 2024
Apply Now:- https://www.allcoding1.com/2024/02/atos-off-campus-drive-for-any-graduate.html
Telegram:- @allcoding1_official
Degree:- Any Graduate
Batch:- 2019, 2020, 2021, 2022, 2023 & 2024
Apply Now:- https://www.allcoding1.com/2024/02/atos-off-campus-drive-for-any-graduate.html
Telegram:- @allcoding1_official
👍1
Forwarded from allcoding1_official
🎯SAS Off Campus Drive 2024 – Associate Software Engineer – Freshers | Rs 4-8 LPA
Job Role : Associate Software Developer
Qualification : B.E/B/Tech/M.E. / M.Tech
Experience : Freshers
Job Location : Pune
Package : Rs 4-8 LPA
Apply Now:- https://www.allcoding1.com/2024/02/sas-off-campus-drive-2024-associate_9.html?m=1
Telegram:- @allcoding1_official
Job Role : Associate Software Developer
Qualification : B.E/B/Tech/M.E. / M.Tech
Experience : Freshers
Job Location : Pune
Package : Rs 4-8 LPA
Apply Now:- https://www.allcoding1.com/2024/02/sas-off-campus-drive-2024-associate_9.html?m=1
Telegram:- @allcoding1_official
Forwarded from allcoding1_official
🎯 Microsoft Bulk Hiring 2024 | For Software Engineer
Degree:- BE, B Tech, BA, B COM, BBA, BSC, BCA, ME, M Tech, MCA, MA, M COM, MSC, Any Graduate
Batch:- 2018, 2019, 2020, 2021, 2022, 2023 ,2024 & 2025
Apply now:- https://www.allcoding1.com/2024/02/microsoft-bulk-hiring-2024-for-software.html
Telegram:- @allcoding1_official
Degree:- BE, B Tech, BA, B COM, BBA, BSC, BCA, ME, M Tech, MCA, MA, M COM, MSC, Any Graduate
Batch:- 2018, 2019, 2020, 2021, 2022, 2023 ,2024 & 2025
Apply now:- https://www.allcoding1.com/2024/02/microsoft-bulk-hiring-2024-for-software.html
Telegram:- @allcoding1_official
❤1
Forwarded from allcoding1_official
🎯Tech Mahindra Off Campus drive
Job Role Associate Software Engineer
Qualification B.E/B.Tech/MCA/M.Sc
Experience Freshers
Batch 2022/2023
Salary Rs.3.25 LPA & 5.5LPA (for super coders)
Job Location Across India
Venue Location Virtual(Online)
Last Date 4 February 2024
Apply now:- https://www.allcoding1.com/2024/02/tech-mahindra-off-campus-drive-2024.html?m=1
Telegram:- @allcoding1_official
Job Role Associate Software Engineer
Qualification B.E/B.Tech/MCA/M.Sc
Experience Freshers
Batch 2022/2023
Salary Rs.3.25 LPA & 5.5LPA (for super coders)
Job Location Across India
Venue Location Virtual(Online)
Last Date 4 February 2024
Apply now:- https://www.allcoding1.com/2024/02/tech-mahindra-off-campus-drive-2024.html?m=1
Telegram:- @allcoding1_official
❤1👍1
Forwarded from allcoding1_official
Seclore Hiring Trainee Product Engineer
Batch : 2023/2024
https://forms.office.com/pages/responsepage.aspx?id=p-D8QJJvrU-J5dFq-aRayJUCwLfnvYFErLS_NRtRc3pUMUFPMzY5RFNTRUhGSzFEWlRHODQxRURGRy4u
Batch : 2023/2024
https://forms.office.com/pages/responsepage.aspx?id=p-D8QJJvrU-J5dFq-aRayJUCwLfnvYFErLS_NRtRc3pUMUFPMzY5RFNTRUhGSzFEWlRHODQxRURGRy4u
Forwarded from allcoding1_official
🎯Gap Inc. is Hiring
Role: Software Engineer
Expected CTC: 10-15 LPA
Location: Hyderabad
🔗Apply here: https://gapinc.com/en-in/jobs/w50/10/software-engineer?rx_campaign=indeed0&rx_ch=jobp4p&rx_group=116953&rx_job=R155010&rx_medium=cpc&rx_r=none&rx_source=Indeed&rx_ts=20240212T040042Z&rx_vp=cpc&src=JB-12080&rx_p=3EEOWPZGT4&rx_viewer=26bfde3e399611ee9af1415c5aa7bfbe5d6d53728456427c859a335976e41692
Role: Software Engineer
Expected CTC: 10-15 LPA
Location: Hyderabad
🔗Apply here: https://gapinc.com/en-in/jobs/w50/10/software-engineer?rx_campaign=indeed0&rx_ch=jobp4p&rx_group=116953&rx_job=R155010&rx_medium=cpc&rx_r=none&rx_source=Indeed&rx_ts=20240212T040042Z&rx_vp=cpc&src=JB-12080&rx_p=3EEOWPZGT4&rx_viewer=26bfde3e399611ee9af1415c5aa7bfbe5d6d53728456427c859a335976e41692
Gap Inc.
Gap Inc. Careers | Gap Inc.
Explore Job Opportunities at Gap Inc.
👍4
Deloitte exam verbal
1) CBDA
2) false
3) At( fill in the blanks 4) In a corner
5) RPQS
6) down
7)He trades both precious and non-precious elements
8) The men yelled in her face
9) in
1) CBDA
2) false
3) At( fill in the blanks 4) In a corner
5) RPQS
6) down
7)He trades both precious and non-precious elements
8) The men yelled in her face
9) in
👍1
1) BUSMUF
2) KXVTL
3) D
4) CANNOT BE DETERMINED
5) E WA SITTING FRONT OF I
2) KXVTL
3) D
4) CANNOT BE DETERMINED
5) E WA SITTING FRONT OF I