+ 1

Php

$cats = array( "P1"=>array( "C1"=>array( "C11"=>array(), "C12"=>array( "C121"=>array() ) ) ), "P2"=>array( "D1"=>array( "D11"=>array( "D121"=>array(), "D122"=>array( "D1221"=>array() ) ), "D12"=>array() ) ), "P3"=>array() ); a. Get deepest child of each parent Expected Output: Deepest child of each parent. P1 => C121 P2 => D1221 P3 => b. Get path for each element in the array Expected output: Path for each element Array ( [P1] => P1 [C1] => P1->C1 [C11] => P1->C1->C11 [C12] => P1->C1->C12 [C121] => P1->C1->C12->C121 [P2] => P2 [D1] => P2->D1 [D11] => P2->D1->D11 [D121] => P2->D1->D11->D121 [D122] => P2->D1->D11->D122 [D1221] => P2->D1->D11->D122->D1221 [D12] => P2->D1->D12 [P3] => P3 ) 1m 33s

11th Jul 2020, 2:42 PM
Ritika Arora
Ritika Arora - avatar
6 Answers
+ 1
Can you please solve this problem
11th Jul 2020, 3:25 PM
Ritika Arora
Ritika Arora - avatar
0
?????
11th Jul 2020, 6:43 PM
Ritika Arora
Ritika Arora - avatar
0
Anybody can solve it
11th Jul 2020, 6:43 PM
Ritika Arora
Ritika Arora - avatar
0
Have you tried? You got a code in progress? maybe you could try to work on it and share your code Actually, I didn't clearly understand the B task. Follow this guide for sharing your code here 👇 https://www.sololearn.com/post/75089/?ref=app
12th Jul 2020, 1:11 AM
Ipang
0
did anyone got the solution
9th Jun 2022, 5:56 PM
Om Kumar
Om Kumar - avatar
0
I have completed this task😗.
25th May 2023, 6:33 AM
Anonymous Singh