Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
الذهاب إلى القناة على Telegram
Main channel https://t.me/Coding_000 Contact Admin 👉 @ILOVEU_143 for booking your exam slots Web- https://coding000.github.io/Projects/ 💯% clearance in any placement exams OffCampus -https://t.me/Offcampus_000 Discussion- https://t.me/exams_discussion
إظهار المزيد3 350
المشتركون
-124 ساعات
-147 أيام
-4730 أيام
أرشيف المشاركات
All of u done all 3 codes?
Yes or no
AnimatedSticker.tgs0.02 KB
class Solution {
public static int maxSum(int A, int B, int C) {
int M = 0, xor = 0, i = 31;
M=Math.max(A,Math.max(B, C));
for(;i>=0 && (M&(1<=0;i--) {
if(calc(A, B, C, i)<=1) {
xor |= 1<0 ? 1 : 0;
int b = (B&(1<0 ? 1 : 0;
int c = (C&(1<0 ? 1 : 0;
int t = a+b+c;
return t;
}
}
share ✅ three numbers java
class Solution {
static List<Integer> tree[];
static long solve(int n, int Par[]) {
tree = new ArrayList[n+1];
for(int i=0;i<=n;i++) tree[i] = new ArrayList<>();
for(int i=1;i<n;i++) {
int u=i+1, v=Par[i];
tree[u].add(v);
tree[v].add(u);
}
return dfs(1, 0);
}
public static int dfs(int cur, int par) {
int sum = 0;
for(int child: tree[cur]) {
if(child==par) continue;
sum += dfs(child, cur);
}
return Math.max(sum, cur);
}
}
Join here :@Coding_000
class Node:
def init(self, val):
self.val = val
self.childs = []
class Solution:
def dfs(self, root):
ans = 0
for child in root.childs:
ans += self.dfs(child)
root.val += ans
if root.val < 0:
ans += -root.val
return ans
def solve(self, n, P):
nodes = {}
for i in range(1, n+1):
nodes[i] = Node(-i)
for i in range(1, n):
child, parent = nodes[i+1], nodes[P[i]]
parent.childs.append(child)
return self.dfs(nodes[1])
Non negative tree
Non negative tree code✅✅
All test cases passed✅✅
Python3
@Coding_000
Bots on social media code
In c++
Bots on social media code✅
Python3 ✅😊
Bots on social media ,three numbers, non negative tree
Coding solutions given to u just share our channel fast ✅😊👍
share ✅ share ✅
Bots on social media ,three numbers, non negative tree
Coding solutions given to u just share our channel fast ✅😊👍
who want coding solutions just share our channel ✅✅
متاح الآن! بحث تيليغرام 2025 — أهم رؤى العام 
