Binary Tree Zigzag Level Order Traversal (C# and Python3)

Given the root of a binary tree, return the zigzag level order traversal of its nodes’ values. (i.e., from left to right, then right to left for the next level and alternate between).

Solution

C#

Python3

Don’t miss these tips!

We don’t spam! Read our privacy policy for more info.

Open chat
Powered by