</>OfferRetriever
DashboardDiscuss
NEW
Halloween SalePremium questions, over 30% offUnlock all premium questions for over 30% off
$10.42$7.08/mo

--

:

--

:

--

:

--

Get this deal
Back to Goldman Sachs Questions

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. ...

Asked at:Goldman Sachs

More Goldman Sachs interview questions

All Goldman Sachs interview questions
OfferRetriever

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

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCodeCompare
LEGAL

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