上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
摘要: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: 阅读全文
posted @ 2016-09-17 09:27 Machelsky 阅读(136) 评论(0) 推荐(0)
摘要: Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: 阅读全文
posted @ 2016-09-17 08:27 Machelsky 阅读(186) 评论(0) 推荐(0)
摘要: Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For example: So 阅读全文
posted @ 2016-09-17 07:27 Machelsky 阅读(210) 评论(0) 推荐(0)
摘要: Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example,If nums =  阅读全文
posted @ 2016-09-17 07:03 Machelsky 阅读(132) 评论(0) 推荐(0)
摘要: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文
posted @ 2016-09-15 15:19 Machelsky 阅读(143) 评论(0) 推荐(0)
摘要: Given an integer, write a function to determine if it is a power of two. Solution1: 检查1的个数,略麻烦。 Solution2: 清零法,跟之前有一道题目很像 阅读全文
posted @ 2016-09-15 14:58 Machelsky 阅读(129) 评论(0) 推荐(0)
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2016-09-15 12:38 Machelsky 阅读(103) 评论(0) 推荐(0)
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2016-09-15 12:25 Machelsky 阅读(102) 评论(0) 推荐(0)
摘要: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the 阅读全文
posted @ 2016-09-15 11:39 Machelsky 阅读(137) 评论(0) 推荐(0)
摘要: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: Backtracking is a more 阅读全文
posted @ 2016-09-14 16:39 Machelsky 阅读(128) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页