上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页
摘要: 题目: Implement int sqrt(int x). Compute and return the square root of x. 链接: http://leetcode.com/problems/sqrtx/ 题解: 求平方根。 二分法, Time Complexity - O(log 阅读全文
posted @ 2015-04-18 00:12 YRB 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You 阅读全文
posted @ 2015-04-18 00:09 YRB 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 链接: http://leetcode.com/problems/add-b 阅读全文
posted @ 2015-04-18 00:08 YRB 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit 阅读全文
posted @ 2015-04-18 00:07 YRB 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 题目: Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true Note: It is intended for 阅读全文
posted @ 2015-04-17 23:58 YRB 阅读(524) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its pa 阅读全文
posted @ 2015-04-17 23:57 YRB 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 题目: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty s 阅读全文
posted @ 2015-04-17 23:54 YRB 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 题目: A robot is located at the top-left corner of a m x ngrid (marked 'Start' in the diagram below). The robot can only move either down or right at an 阅读全文
posted @ 2015-04-17 23:53 YRB 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2 阅读全文
posted @ 2015-04-17 23:50 YRB 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 题目: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order,We get the following sequ 阅读全文
posted @ 2015-04-17 23:49 YRB 阅读(659) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页