层序遍历
Data Structures & Algorithms · 4 notes
- Binary Tree Right Side Viewhistorical
Given a binary tree, imagine standing on its right side. Return the values of the nodes visible from the right, ordered from top to bottom.
- Binary Tree Level Order Traversalhistorical
Given a binary tree, return the node values obtained by level-order traversal (that is, visit all nodes level by level from left to right).
- Serialize and Deserialize Binary Treehistorical
Serialization converts a data structure or object into a continuous representation so the result can be stored in a file or memory, transmitted over a network, and later reconstructed by the reverse operation.
- Binary Tree Zigzag Level Order Traversalhistorical
Given the root root of a binary tree, return the zigzag level-order traversal of its node values (left to right on one level, then right to left on the next, alternating between levels).