上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 50 下一页
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2018-03-22 09:06 轻风舞动 阅读(582) 评论(0) 推荐(0) 编辑
摘要: You are asked to cut off trees in a forest for a golf event. The forest is represented as a non-negative 2D map, in this map: You are asked to cut off 阅读全文
posted @ 2018-03-22 08:56 轻风舞动 阅读(602) 评论(0) 推荐(0) 编辑
摘要: The Fibonacci numbers are the numbers in the following integer sequence. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …….. In mathematical terms, the 阅读全文
posted @ 2018-03-22 06:14 轻风舞动 阅读(334) 评论(0) 推荐(0) 编辑
摘要: Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the u 阅读全文
posted @ 2018-03-21 09:14 轻风舞动 阅读(766) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adja 阅读全文
posted @ 2018-03-21 06:56 轻风舞动 阅读(427) 评论(0) 推荐(0) 编辑
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. For example, given the following ma 阅读全文
posted @ 2018-03-21 06:36 轻风舞动 阅读(544) 评论(0) 推荐(0) 编辑
摘要: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c" Corner Cases: Di 阅读全文
posted @ 2018-03-20 13:09 轻风舞动 阅读(434) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2018-03-20 09:06 轻风舞动 阅读(868) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up:Can you solve it without using extra space? 阅读全文
posted @ 2018-03-20 08:56 轻风舞动 阅读(415) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 给定一个链表,判断是否有环存在。Follow up: 不使用额外空间。 解法:双 阅读全文
posted @ 2018-03-20 08:46 轻风舞动 阅读(241) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 50 下一页