上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页
摘要: 题目:There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it c... 阅读全文
posted @ 2014-08-03 09:02 爱做饭的小莹子 阅读(2387) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarificatio... 阅读全文
posted @ 2014-08-03 08:50 爱做饭的小莹子 阅读(1535) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra s... 阅读全文
posted @ 2014-08-03 04:39 爱做饭的小莹子 阅读(3558) 评论(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 i... 阅读全文
posted @ 2014-08-03 04:32 爱做饭的小莹子 阅读(5543) 评论(2) 推荐(1) 编辑
摘要: 题目:Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to ... 阅读全文
posted @ 2014-08-03 02:59 爱做饭的小莹子 阅读(2649) 评论(0) 推荐(1) 编辑
摘要: 题目:Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1... 阅读全文
posted @ 2014-08-03 02:45 爱做饭的小莹子 阅读(3886) 评论(0) 推荐(1) 编辑
摘要: 题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the... 阅读全文
posted @ 2014-08-03 02:34 爱做饭的小莹子 阅读(4303) 评论(1) 推荐(1) 编辑
摘要: 题目: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the foll... 阅读全文
posted @ 2014-08-03 02:17 爱做饭的小莹子 阅读(2391) 评论(0) 推荐(0) 编辑
摘要: 题目: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:[[ ... 阅读全文
posted @ 2014-08-03 02:07 爱做饭的小莹子 阅读(3368) 评论(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 @ 2014-08-02 23:49 爱做饭的小莹子 阅读(1869) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页