Unival Trees — Asked in Google and Amazon Interview

Problem Statement :

1 2 3 2 -1 3 4 -1 -1 3 3 -1 -1 -1 -1 -1 -1
6

Approach :

Code :

Thanks for Reading

Upskilling students for tech placements!