摘要:
题目: 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 formed by connecting adj 阅读全文
posted @ 2015-05-10 06:46
YRB
阅读(2064)
评论(0)
推荐(0)
摘要:
题目: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For 阅读全文
posted @ 2015-05-10 06:42
YRB
阅读(465)
评论(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 stoppin 阅读全文
posted @ 2015-05-10 06:37
YRB
阅读(320)
评论(0)
推荐(0)
摘要:
题目: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32- 阅读全文
posted @ 2015-05-10 06:28
YRB
阅读(472)
评论(0)
推荐(0)
摘要:
题目: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), r 阅读全文
posted @ 2015-05-10 06:16
YRB
阅读(498)
评论(0)
推荐(0)
摘要:
题目: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. 阅读全文
posted @ 2015-05-10 06:03
YRB
阅读(443)
评论(0)
推荐(0)
摘要:
题目:链接:题解:测试:Reference: 阅读全文
posted @ 2015-05-10 05:54
YRB
阅读(189)
评论(0)
推荐(0)
摘要:
题目: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful 阅读全文
posted @ 2015-05-10 05:47
YRB
阅读(894)
评论(0)
推荐(0)
摘要:
题目: Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters. The input string does not contain 阅读全文
posted @ 2015-05-10 05:41
YRB
阅读(544)
评论(0)
推荐(0)
摘要:
题目: Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest form 阅读全文
posted @ 2015-05-10 05:39
YRB
阅读(516)
评论(0)
推荐(0)
摘要:
题目:The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out i... 阅读全文
posted @ 2015-05-10 03:54
YRB
阅读(577)
评论(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 t 阅读全文
posted @ 2015-05-10 03:49
YRB
阅读(668)
评论(0)
推荐(0)
摘要:
题目: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 链接: http://leetcode. 阅读全文
posted @ 2015-05-10 03:47
YRB
阅读(351)
评论(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 阅读全文
posted @ 2015-05-10 03:36
YRB
阅读(293)
评论(0)
推荐(0)
摘要:
题目: Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure. 阅读全文
posted @ 2015-05-10 03:28
YRB
阅读(582)
评论(0)
推荐(0)
摘要:
题目: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that 阅读全文
posted @ 2015-05-10 03:27
YRB
阅读(342)
评论(0)
推荐(0)
摘要:
题目: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 链接: http://leetcode.com/problems/excel-s 阅读全文
posted @ 2015-05-10 03:25
YRB
阅读(801)
评论(0)
推荐(0)
摘要:
题目: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The func 阅读全文
posted @ 2015-05-10 03:23
YRB
阅读(1094)
评论(0)
推荐(0)
摘要:
题目: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repea 阅读全文
posted @ 2015-05-10 03:19
YRB
阅读(725)
评论(0)
推荐(0)
摘要:
题目: Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. You may a 阅读全文
posted @ 2015-05-10 03:16
YRB
阅读(739)
评论(0)
推荐(0)

浙公网安备 33010602011771号