摘要: LeetCode 59. Spiral Matrix II (螺旋矩阵 II) 题目 链接 https://leetcode-cn.com/problems/spiral-matrix-ii/ 问题描述 给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x 阅读全文
posted @ 2022-04-28 21:34 cheng102e 阅读(13) 评论(0) 推荐(0) 编辑
摘要: LeetCode 54. Spiral Matrix (螺旋矩阵) 题目 链接 https://leetcode-cn.com/problems/spiral-matrix/ 问题描述 给你一个 m 行 n 列的矩阵 matrix ,请按照 顺时针螺旋顺序 ,返回矩阵中的所有元素。 示例 输入:ma 阅读全文
posted @ 2022-04-28 21:33 cheng102e 阅读(11) 评论(0) 推荐(0) 编辑
摘要: LeetCode 904. Fruit Into Baskets (水果成篮) 题目 链接 问题描述 你正在探访一家农场,农场从左到右种植了一排果树。这些树用一个整数数组 fruits 表示,其中 fruits[i] 是第 i 棵树上的水果 种类 。 你想要尽可能多地收集水果。然而,农场的主人设定了 阅读全文
posted @ 2022-04-28 21:02 cheng102e 阅读(37) 评论(0) 推荐(0) 编辑
摘要: LeetCode 844. Backspace String Compare (比较含退格的字符串) 题目 链接 https://leetcode-cn.com/problems/backspace-string-compare/ 问题描述 给定 s 和 t 两个字符串,当它们分别被输入到空白的文本 阅读全文
posted @ 2022-04-28 19:55 cheng102e 阅读(20) 评论(0) 推荐(0) 编辑