摘要: 问题: 以↘️对角线为轴,折叠反转数组 Example 1: Input: [[1,2,3],[4,5,6],[7,8,9]] Output: [[1,4,7],[2,5,8],[3,6,9]] Example 2: Input: [[1,2,3],[4,5,6]] Output: [[1,4],[ 阅读全文
posted @ 2020-05-17 14:31 habibah_chang 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定一个二维数组,求子数组之和为target的子数组个数。 Example 1: Input: matrix = [[0,1,0],[1,1,1],[0,1,0]], target = 0 Output: 4 Explanation: The four 1x1 submatrices tha 阅读全文
posted @ 2020-05-17 14:06 habibah_chang 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定一个行程长度编码序列A,即偶数为代表下一位数的个数。 如A=[3,8,0,9,2,5],是序列【88855】的编码。 next(n)函数返回,对被编码序列消化n个数后最后消化的数值。实现初始化函数RLEIterator和next函数。 Example 1: Input: ["RLEIte 阅读全文
posted @ 2020-05-17 10:50 habibah_chang 阅读(133) 评论(0) 推荐(0) 编辑