摘要:
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr... 阅读全文
摘要:
Given a 2D matrixmatrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1,col1) and lower right corner (row2,c... 阅读全文
摘要:
Given an integer, write a function to determine if it is a power of two.看一个数是不是2的幂,代码如下: 1 class Solution { 2 public: 3 bool isPowerOfTwo(int n) {... 阅读全文