上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页

2015年6月9日

摘要: 题目:The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font... 阅读全文
posted @ 2015-06-09 09:54 承续缘 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following ma... 阅读全文
posted @ 2015-06-09 08:21 承续缘 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 题目: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-06-09 07:54 承续缘 阅读(265) 评论(0) 推荐(0) 编辑

2015年6月8日

摘要: 题目:Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onl... 阅读全文
posted @ 2015-06-08 23:28 承续缘 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 题目:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4... 阅读全文
posted @ 2015-06-08 23:14 承续缘 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目:You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concat... 阅读全文
posted @ 2015-06-08 22:59 承续缘 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 题目:Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-n... 阅读全文
posted @ 2015-06-08 17:00 承续缘 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECOD... 阅读全文
posted @ 2015-06-08 15:13 承续缘 阅读(215) 评论(0) 推荐(0) 编辑

2015年6月6日

摘要: 题目:Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].代码:/** * De... 阅读全文
posted @ 2015-06-06 19:28 承续缘 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initia... 阅读全文
posted @ 2015-06-06 18:12 承续缘 阅读(335) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页

导航