摘要: [LeetCode] 55. 跳跃游戏 题目 给定一个非负整数数组 nums ,你最初位于数组的 第一个下标 。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 判断你是否能够到达最后一个下标。 示例 1: 输入:nums = [2,3,1,1,4] 输出:true 解释:可以先跳 1 步,从下 阅读全文
posted @ 2021-10-19 16:59 沐灵_hh 阅读(18) 评论(0) 推荐(0) 编辑
摘要: [LeetCode] 395. 至少有 K 个重复字符的最长子串 题目 给你一个字符串 s 和一个整数 k ,请你找出 s 中的最长子串, 要求该子串中的每一字符出现次数都不少于 k 。返回这一子串的长度。 示例 1: 输入:s = "aaabb", k = 3 输出:3 解释:最长子串为 "aaa 阅读全文
posted @ 2021-10-19 16:40 沐灵_hh 阅读(45) 评论(0) 推荐(0) 编辑
摘要: [LeetCode] 61. 旋转链表 题目 Given the head of a linked list, rotate the list to the right by k places. Example 1: Input: head = [1,2,3,4,5], k = 2 Output: 阅读全文
posted @ 2021-10-19 16:32 沐灵_hh 阅读(21) 评论(0) 推荐(0) 编辑
摘要: [LeetCode] 60. 排列序列 题目 The set [1, 2, 3, ..., n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, 阅读全文
posted @ 2021-10-19 16:24 沐灵_hh 阅读(31) 评论(0) 推荐(0) 编辑
摘要: [LeetCode] 59. 螺旋矩阵 II 题目 Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: Input: n 阅读全文
posted @ 2021-10-19 16:11 沐灵_hh 阅读(20) 评论(0) 推荐(0) 编辑