上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: Rotate ImageYou are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?每次转换四个点... 阅读全文
posted @ 2015-09-09 21:20 Sean_le 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Minimum Path SumGiven amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along ... 阅读全文
posted @ 2015-09-09 19:47 Sean_le 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a sol... 阅读全文
posted @ 2015-09-09 18:37 Sean_le 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Gray CodeThe gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the tot... 阅读全文
posted @ 2015-09-09 17:29 Sean_le 阅读(831) 评论(0) 推荐(0) 编辑
摘要: Unique PathsA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right a... 阅读全文
posted @ 2015-09-09 16:45 Sean_le 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 最近有个需求就是去除一个文本里面所有的非汉字字符。 unicide的汉字有个范围u4e00-u9fa5。所以这个范围内的留下来就可以了。 1 blog=u"【雅虎开始提示Chrome用户“升级”到Firefox】http://t.cn/RzHTFF5 国外有关浏览器、搜索引擎那些事儿,也是刀光剑影, 阅读全文
posted @ 2015-09-08 13:56 Sean_le 阅读(616) 评论(0) 推荐(0) 编辑
摘要: Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).... 阅读全文
posted @ 2015-09-07 20:02 Sean_le 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Find Minimum in Rotated Sorted Array IIFollow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time... 阅读全文
posted @ 2015-09-07 19:27 Sean_le 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Find Minimum in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0... 阅读全文
posted @ 2015-09-07 19:15 Sean_le 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Implement Queue using StacksImplement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes... 阅读全文
posted @ 2015-09-07 17:25 Sean_le 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页