上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 22 下一页
摘要: Word PatternGiven apatternand a stringstr, find ifstrfollows the same pattern.Herefollowmeans a full match, such that there is a bijection between a l... 阅读全文
posted @ 2015-10-10 22:28 `Liok 阅读(518) 评论(0) 推荐(0) 编辑
摘要: Set Matrix ZeroesGiven amxnmatrix, 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 us... 阅读全文
posted @ 2015-10-05 15:49 `Liok 阅读(360) 评论(0) 推荐(0) 编辑
摘要: Find the Duplicate NumberGiven an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate ... 阅读全文
posted @ 2015-10-02 17:51 `Liok 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Reverse Linked List IIReverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return... 阅读全文
posted @ 2015-10-02 16:21 `Liok 阅读(227) 评论(0) 推荐(0) 编辑
摘要: Pascal's Triangle IIGiven an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your alg... 阅读全文
posted @ 2015-09-27 19:45 `Liok 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Pascal's TriangleGivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,... 阅读全文
posted @ 2015-09-27 19:41 `Liok 阅读(348) 评论(0) 推荐(0) 编辑
摘要: House Robber IINote:This is an extension ofHouse Robber.After robbing those houses on that street, the thief has found himself a new place for his thi... 阅读全文
posted @ 2015-09-27 17:29 `Liok 阅读(232) 评论(0) 推荐(0) 编辑
摘要: House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint... 阅读全文
posted @ 2015-09-27 17:14 `Liok 阅读(299) 评论(0) 推荐(0) 编辑
摘要: Spiral Matrix IIGiven an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the... 阅读全文
posted @ 2015-09-27 16:06 `Liok 阅读(402) 评论(0) 推荐(0) 编辑
摘要: Spiral MatrixGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[... 阅读全文
posted @ 2015-09-27 15:55 `Liok 阅读(498) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 22 下一页