上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 76 下一页
摘要: 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)
摘要: Given a m x n grid filled with non negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2018-11-07 13:08 bernieloveslife 阅读(89) 评论(0) 推荐(0)
摘要: A robot is located at the top left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2018-11-07 13:08 bernieloveslife 阅读(115) 评论(0) 推荐(0)
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 76 下一页