摘要:
An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i = A[j]. Return true i 阅读全文
posted @ 2018-11-30 15:14
bernieloveslife
阅读(89)
评论(0)
推荐(0)
摘要:
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文
posted @ 2018-11-30 15:14
bernieloveslife
阅读(90)
评论(0)
推荐(0)
摘要:
We are given two sentences A and B. (A sentence is a string of space separated words. Each word consists only of lowercase letters.) A word is uncommo 阅读全文
posted @ 2018-11-30 15:14
bernieloveslife
阅读(172)
评论(0)
推荐(0)
摘要:
Given a binary tree struct TreeLinkNode { TreeLinkNode left; TreeLinkNode right; TreeLinkNode next; } Populate each next pointer to point to its next 阅读全文
posted @ 2018-11-30 15:13
bernieloveslife
阅读(121)
评论(0)
推荐(0)
摘要:
Given a binary tree struct TreeLinkNode { TreeLinkNode left; TreeLinkNode right; TreeLinkNode next; } Populate each next pointer to point to its next 阅读全文
posted @ 2018-11-30 15:13
bernieloveslife
阅读(104)
评论(0)
推荐(0)
摘要:
Given a binary tree, flatten it to a linked list in place. For example, given the following tree: The flattened tree should look like: 阅读全文
posted @ 2018-11-30 15:13
bernieloveslife
阅读(74)
评论(0)
推荐(0)
摘要:
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2018-11-30 15:13
bernieloveslife
阅读(90)
评论(0)
推荐(0)
摘要:
Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example 阅读全文
posted @ 2018-11-30 15:13
bernieloveslife
阅读(116)
评论(0)
推荐(0)

浙公网安备 33010602011771号