super money SDE2 (flipkart)

Anonymous User
898
Jan 29, 2024
Jan 29, 2024

if you have tree

			1
	 2            3
 4	    5

then find last node ans =5 , with less than O(n) complexity , with child to parent relationship,

i gave O(n) solution but he wanted me to figure out was which was less than i gave , parent = child/2 this relation he was hinting but didnt figure out how we can use that.

let me knwo if you find anything.

Comments (2)