摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. 阅读全文
posted @ 2014-06-26 20:14 jdflyfly 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. 阅读全文
posted @ 2014-06-26 20:13 jdflyfly 阅读(140) 评论(0) 推荐(0) 编辑
摘要: The set [1,2,3,…,n] contains a total of n! unique permutations. 阅读全文
posted @ 2014-06-26 20:12 jdflyfly 阅读(251) 评论(0) 推荐(0) 编辑
摘要: Given a list, rotate the list to the right by k places, where k is non-negative. 阅读全文
posted @ 2014-06-26 20:11 jdflyfly 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Given a collection of intervals, merge all overlapping intervals. 阅读全文
posted @ 2014-06-26 20:10 jdflyfly 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. 阅读全文
posted @ 2014-06-26 20:09 jdflyfly 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. 阅读全文
posted @ 2014-06-26 20:08 jdflyfly 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. 阅读全文
posted @ 2014-06-26 20:07 jdflyfly 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings, return all groups of strings that are anagrams. 阅读全文
posted @ 2014-06-26 20:06 jdflyfly 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Implement pow(x, n). 阅读全文
posted @ 2014-06-26 20:05 jdflyfly 阅读(206) 评论(0) 推荐(0) 编辑