YOU ARE GIVEN AN UNDIRECTED TREE WITH N NODES NUMBERED FROM 0 TO N-1 YOU ARE ALSO GIVEN AN ARRAY arr of size N such that for a node u arr[u] tells the number of elements strictly smaller that it in the subtree of u
FIND ALL THE POSSIBILE ARRAY VALUES THAT SATISFY THE FOLLOWING CONDITIONS
.the array values have to be permutation from 1 to N representing the value of nodes
for every nodes u the number of elements strictly smaller that it in the subtree of u is arr[u]
if no such array values exist then return - 1
Answers
Answered by
0
Explanation:
The correct option is C 1 kg 250 g
Given, Weight of a ₹ 2 coin = 5 g
Weight of bag with 250 coins
= 250 × 5 = 1250 g
We know, 1 kg = 1000 g
∴
1250 g = 1000 g + 250 g
∴
1250 g = 1 kg 250 g
Similar questions