You are viewing a single comment's thread. Return to all comments →
Why have you only considered top root like this, why did'nt you made every root level same as the top one ? @Faland is right and geeksforgeeks also refers the same .
we should have level orders from top(root). So according to this question, we can only consider for root alone.