随笔分类 - LeetCode
摘要:题目: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The len
阅读全文
摘要:题目: A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if t
阅读全文
摘要:题目: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original d
阅读全文
摘要:1 题目: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes s
阅读全文