加载中...
分类详情
中等 分类
647-回文子串(Palindromic Substrings)
原文链接: https://leetcode-cn.com/problems/palindromic-substrings 英文原文Given a string s, return the number of palindromic substrings in it. A string is a palindrome when it reads the same backward as forward. A substring is a contiguous sequence of charac…
2021-12-03
665-非递减数列(Non-decreasing Array)
原文链接: https://leetcode-cn.com/problems/non-decreasing-array 英文原文Given an array nums with n integers, your task is to check if it could become non-decreasing by modifying at most one element. We define an array is non-decreasing if nums[i] <= nums[i +…
2021-12-03
667-优美的排列 II(Beautiful Arrangement II)
原文链接: https://leetcode-cn.com/problems/beautiful-arrangement-ii 英文原文Given two integers n and k, construct a list answer that contains n different positive integers ranging from 1 to n and obeys the following requirement: Suppose this list is answer =…
2021-12-03
670-最大交换(Maximum Swap)
原文链接: https://leetcode-cn.com/problems/maximum-swap 英文原文You are given an integer num. You can swap two digits at most once to get the maximum valued number. Return the maximum valued number you can get. Example 1: Input: num = 2736 Output: 7236 Expla…
2021-12-03