Symmetric Tree
Symmetric Tree题目Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree
Symmetric Tree题目Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree
Same Tree题目Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are str
Recover Binary Search Tree题目Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structu
Validate Binary Search Tree题目Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows:
Unique Binary Tree II题目Given n, generate all structurally unique BST’s (binary search trees) that store values 1…n. For example, Given n = 3
Unique Binary Search Trees题目Given n, how many structurally unique BST’s (binary search trees) that store values 1…n? For example, Given n =
Binary Tree Inorder Traversal题目Given a binary tree, return the inorder traversal of its nodes’ values. For example: Given binary tree {1,#,2
Remove Linked List Elements题目Remove all elements from a linked list of integers that have value val. Example Given: 1 —> 2 —> 6 —>
Intersection of Two Linked Lists题目Write a program to find the node at which the intersection of two singly linked lists begins. For example,
Sort List题目Sort a linked list in O(n log n) time using constant space complexity. 思路归并排序 解题c++ 版 1234567891011121314151617181920212223242526