2015年4月26日

摘要: 题目:Given 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 use extra space?... 阅读全文
posted @ 2015-04-26 23:16 承续缘 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题目:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total num... 阅读全文
posted @ 2015-04-26 20:30 承续缘 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 题目:You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl... 阅读全文
posted @ 2015-04-26 17:52 承续缘 阅读(164) 评论(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 is... 阅读全文
posted @ 2015-04-26 16:52 承续缘 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 题目:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?代码:class Solutio... 阅读全文
posted @ 2015-04-26 16:29 承续缘 阅读(143) 评论(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... 阅读全文
posted @ 2015-04-26 10:02 承续缘 阅读(189) 评论(0) 推荐(0) 编辑

导航