上一页 1 2 3 4 5 6 ··· 23 下一页
摘要: Ugly number is a number that only have factors 2, 3 and 5. Design an algorithm to find the nth ugly number. The first 10 ugly numbers are 1, 2, 3, 4, 阅读全文
posted @ 2016-04-07 06:13 哥布林工程师 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Write a program to check whether a given number is an ugly number`. Ugly numbers are positive numbers whose prime factors only include 2,3, 5. For exa 阅读全文
posted @ 2016-04-07 05:25 哥布林工程师 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given a list of numbers that may has duplicate numbers, return all possible subsets Notice Each element in a subset must be in non-descending order. T 阅读全文
posted @ 2016-04-07 03:17 哥布林工程师 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers, return all possible subsets. Notice Elements in a subset must be in non-descending order. The solution set must not 阅读全文
posted @ 2016-04-07 02:59 哥布林工程师 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given an integer matrix, find a submatrix where the sum of numbers is zero. Your code should return the coordinate of the left-up and right-down numbe 阅读全文
posted @ 2016-04-06 18:34 哥布林工程师 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find a subarray with sum closest to zero. Return the indexes of the first number and last number. Example Given [-3, 1, 1, -3, 阅读全文
posted @ 2016-04-06 12:43 哥布林工程师 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order. Example Given n = 3, You should return the following 阅读全文
posted @ 2016-04-06 12:15 哥布林工程师 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example Given the following matrix: [ [ 1, 2, 阅读全文
posted @ 2016-04-06 10:36 哥布林工程师 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list in O(n log n) time using constant space complexity. Example Given 1-3->2->null, sort it to 1->2->3->null. /** * Definition for List 阅读全文
posted @ 2016-04-06 07:53 哥布林工程师 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given a string which contains only letters. Sort it by lower case first and upper case second. Notice It's NOT necessary to keep the original order of 阅读全文
posted @ 2016-04-06 07:35 哥布林工程师 阅读(218) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 23 下一页