上一页 1 2 3 4 5 6 7 8 ··· 18 下一页
摘要: 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 following matrix: You s 阅读全文
posted @ 2016-08-19 12:27 fenshen371 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-08-19 11:38 fenshen371 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is th 阅读全文
posted @ 2016-08-19 08:33 fenshen371 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected 阅读全文
posted @ 2016-08-19 07:11 fenshen371 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes  阅读全文
posted @ 2016-08-18 11:30 fenshen371 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 阅读全文
posted @ 2016-08-18 11:11 fenshen371 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Given a sorted integer array where the range of elements are [lower, upper] inclusive, return its missing ranges. For example, given [0, 1, 3, 50, 75] 阅读全文
posted @ 2016-08-17 11:10 fenshen371 阅读(122) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smal 阅读全文
posted @ 2016-08-17 08:56 fenshen371 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2016-08-15 02:54 fenshen371 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if a permutation of the string could form a palindrome. For example,"code" -> False, "aab" -> True, "carerac" -> True. 要点:学习 阅读全文
posted @ 2016-08-15 02:39 fenshen371 阅读(144) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页