摘要:
题目: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?... 阅读全文
摘要:
题目: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... 阅读全文
摘要:
题目: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... 阅读全文
摘要:
题目: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... 阅读全文
摘要:
题目: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... 阅读全文
摘要:
题目: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... 阅读全文