06 2016 档案

摘要:There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2016-06-30 13:58 新一代的天皇巨星 阅读(137) 评论(0) 推荐(0)
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2016-06-30 12:36 新一代的天皇巨星 阅读(142) 评论(0) 推荐(0)
摘要:Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assum 阅读全文
posted @ 2016-06-30 12:03 新一代的天皇巨星 阅读(182) 评论(0) 推荐(0)
摘要:79. Word Search Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent ce 阅读全文
posted @ 2016-06-28 13:43 新一代的天皇巨星 阅读(150) 评论(0) 推荐(0)
摘要:54. Spiral Matrix Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the follo 阅读全文
posted @ 2016-06-28 12:48 新一代的天皇巨星 阅读(207) 评论(0) 推荐(0)
摘要:341. Flatten Nested List Iterator Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list - 阅读全文
posted @ 2016-06-28 03:40 新一代的天皇巨星 阅读(213) 评论(0) 推荐(0)
摘要:146. LRU Cache Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get 阅读全文
posted @ 2016-06-27 13:50 新一代的天皇巨星 阅读(249) 评论(0) 推荐(0)
摘要:10. Regular Expression Matching Implement regular expression matching with support for '.' and '*'. 44. Wildcard Matching 44. Wildcard Matching Implem 阅读全文
posted @ 2016-06-26 13:34 新一代的天皇巨星 阅读(203) 评论(0) 推荐(0)
摘要:4. Median of Two Sorted Arrays There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The 阅读全文
posted @ 2016-06-25 13:47 新一代的天皇巨星 阅读(193) 评论(0) 推荐(0)
摘要:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2016-06-23 14:32 新一代的天皇巨星 阅读(191) 评论(0) 推荐(0)
摘要:Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Given a non-negative integer n, count all numbers with uni 阅读全文
posted @ 2016-06-20 11:09 新一代的天皇巨星 阅读(522) 评论(0) 推荐(0)
摘要:Additive number is a string whose digits can form additive sequence. Additive number is a string whose digits can form additive sequence. A valid addi 阅读全文
posted @ 2016-06-19 04:56 新一代的天皇巨星 阅读(378) 评论(0) 推荐(0)
摘要:Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. Given two integers representing the 阅读全文
posted @ 2016-06-19 01:39 新一代的天皇巨星 阅读(207) 评论(0) 推荐(0)
摘要:39. Combination Sum Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums t 阅读全文
posted @ 2016-06-11 07:15 新一代的天皇巨星 阅读(451) 评论(0) 推荐(0)
摘要:Given an array of strings, group anagrams together. Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate 阅读全文
posted @ 2016-06-11 05:58 新一代的天皇巨星 阅读(175) 评论(0) 推荐(0)
摘要:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2016-06-08 23:48 新一代的天皇巨星 阅读(191) 评论(0) 推荐(0)
摘要:200. Number of Islands Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is forme 阅读全文
posted @ 2016-06-08 12:08 新一代的天皇巨星 阅读(173) 评论(0) 推荐(0)
摘要:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2016-06-06 08:19 新一代的天皇巨星 阅读(189) 评论(0) 推荐(0)
摘要:231. Power ofTwo Given an integer, write a function to determine if it is a power of two. Hide Similar Problems (E) Number of 1 Bits (E) Power of Thre 阅读全文
posted @ 2016-06-05 14:21 新一代的天皇巨星 阅读(215) 评论(0) 推荐(0)
摘要:280. Wiggle Sort Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... For example, given nums = [3 阅读全文
posted @ 2016-06-05 07:37 新一代的天皇巨星 阅读(1669) 评论(0) 推荐(0)
摘要:215. Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, n 阅读全文
posted @ 2016-06-05 06:12 新一代的天皇巨星 阅读(521) 评论(0) 推荐(0)
摘要:Given an unsorted array of integers, find the length of longest increasing subsequence. For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest inc 阅读全文
posted @ 2016-06-03 14:09 新一代的天皇巨星 阅读(429) 评论(0) 推荐(0)
摘要:Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Return true if 阅读全文
posted @ 2016-06-03 13:51 新一代的天皇巨星 阅读(220) 评论(0) 推荐(0)