上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 40 下一页
摘要: I. Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3... 阅读全文
posted @ 2015-09-09 03:06 amazingzoe 阅读(137) 评论(0) 推荐(0)
摘要: Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Fo... 阅读全文
posted @ 2015-09-05 21:05 amazingzoe 阅读(166) 评论(0) 推荐(0)
摘要: Given two words (beginWordandendWord), and a dictionary, find the length of shortest transformation sequence frombeginWordtoendWord, such that:Only on... 阅读全文
posted @ 2015-09-03 13:03 amazingzoe 阅读(123) 评论(0) 推荐(0)
摘要: Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return 0 i... 阅读全文
posted @ 2015-09-03 03:46 amazingzoe 阅读(102) 评论(0) 推荐(0)
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-09-03 01:34 amazingzoe 阅读(136) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?Analyse: Obtain the elements first, ... 阅读全文
posted @ 2015-09-02 03:15 amazingzoe 阅读(128) 评论(0) 推荐(0)
摘要: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文
posted @ 2015-09-02 02:39 amazingzoe 阅读(130) 评论(0) 推荐(0)
摘要: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2015-09-02 00:32 amazingzoe 阅读(111) 评论(0) 推荐(0)
摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2015-09-01 21:48 amazingzoe 阅读(189) 评论(0) 推荐(0)
摘要: Given an integer, write a function to determine if it is a power of two.Analyse:***Notice that if a number is a power of 2, then the highest binary di... 阅读全文
posted @ 2015-08-29 06:10 amazingzoe 阅读(163) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 40 下一页