Binary Tree Zigzag Level Order Traversal
Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).(按层从左到右->从右到左遍历二叉树)
Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).(按层从左到右->从右到左遍历二叉树)
Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).
(按层遍历二叉树)
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
(对称二叉树)
Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the same value.
(判断二叉树是否相同)
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure.
(复原二叉排序树)
Given a binary tree, determine if it is a valid binary search tree (BST).
(判断是否为二叉排序树)
Assume a BST is defined as follows:
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
(判断s1 与 s2 相互插入可否组成 s3)
Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n.
(有效二叉查找(排序)树个数)
Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1 … n.
(构建二叉查找(排序)树)
Given a binary tree, return the inorder traversal of its nodes’ values.
(中序遍历二叉树)