上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: Given a binary tree, return the values of its boundary in anti-clockwise direction starting from root. Boundary includes left boundary, leaves, and ri 阅读全文
posted @ 2017-11-23 16:53 jxr041100 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Check whether the original sequence org can be uniquely reconstructed from the sequences in seqs. The org sequence is a permutation of the integers fr 阅读全文
posted @ 2017-11-23 16:51 jxr041100 阅读(306) 评论(1) 推荐(0) 编辑
摘要: Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list 阅读全文
posted @ 2017-11-23 16:49 jxr041100 阅读(115) 评论(0) 推荐(0) 编辑
摘要: You are given a m x n 2D grid initialized with these three possible values. Fill each empty room with the distance to its nearest gate. If it is impos 阅读全文
posted @ 2017-11-23 16:48 jxr041100 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak 阅读全文
posted @ 2017-11-23 16:46 jxr041100 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room 阅读全文
posted @ 2017-11-23 16:45 jxr041100 阅读(81) 评论(0) 推荐(0) 编辑
摘要: A group of two or more people wants to meet and minimize the total travel distance. You are given a 2D grid of values 0 or 1, where each 1 marks the h 阅读全文
posted @ 2017-11-23 16:44 jxr041100 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2017-11-23 16:43 jxr041100 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. For example:Given 阅读全文
posted @ 2017-11-23 16:41 jxr041100 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a string, we can "shift" each of its letter to its successive letter, for example: "abc" -> "bcd". We can keep "shifting" which forms the sequen 阅读全文
posted @ 2017-11-23 16:40 jxr041100 阅读(123) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页