</>OfferRetriever
DashboardDiscuss
NEW

Summer Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

14

:

03

:

02

:

33

Get this deal
Back to Dashboard

Tree Diagonal Traversal

Medium

Given a binary tree, print its diagonal traversal. In a diagonal traversal, all nodes that share the same number of right-edge traversals from the root are grouped together on the same diagonal.

More specifically, the diagonal index of a node equals the number of right edges on the path from root to that node. Within each diagonal, nodes are printed in the order they appear during a breadth-first traversal of the tree. ...

OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCode
LEGAL
POPULAR COMPANIES
GoogleMetaAmazonMicrosoftNetflixStripeUberTikTokBrowse all companies →

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.