GoCalf Calf 的自留地 · 昙花一现

全站内容

easy

  • 46. Permutations

    Coding

    #Problem Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. A permutation is a rearrangement of all the elements of an array. https://leetcode.cn/problems/permutations/ …

    easy
  • 1790. Check if One String Swap Can Make Strings Equal

    Coding

    #Problem You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose two indices in a string (not necessarily different) and swap the characters at these indices. Return true if it is possible to make …

    easy
  • 90. Subsets II

    Coding

    #Problem Given an integer array nums that may contain duplicates, return all possible subsets (the power set). A subset of an array is a selection of elements (possibly none) of the array. The solution set must not contain duplicate …

    easy
  • 78. Subsets

    Coding

    #Problem Given an integer array nums of unique elements, return all possible subsets (the power set). A subset of an array is a selection of elements (possibly none) of the array. The solution set must not contain duplicate subsets. Return …

    easy
  • 1800. Maximum Ascending Subarray Sum

    Coding

    #Problem Given an array of positive integers nums, return the maximum possible sum of an ascending subarray in nums. A subarray is defined as a contiguous sequence of numbers in an array. A subarray [numsl, numsl+1, ..., numsr-1, numsr] is …

    easy
  • 922. Sort Array By Parity II

    Coding

    #Problem Given an array of integers nums, half of the integers in nums are odd, and the other half are even. Sort the array so that whenever nums[i] is odd, i is odd, and whenever nums[i] is even, i is even. Return any answer array that …

    easy
  • 905. Sort Array By Parity

    Coding

    #Problem Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integers. Return any array that satisfies this condition. https://leetcode.cn/problems/sort-array-by-parity/ Example 1: …

    easy
  • 3105. Longest Strictly Increasing or Strictly Decreasing Subarray

    Coding

    #Problem You are given an array of integers nums. Return the length of the longest subarray of nums which is either strictly increasing or strictly decreasing. A subarray is a contiguous non-empty sequence of elements within an array. An …

    easy
  • 680. Valid Palindrome II

    Coding

    #Problem Given a string s, return true if the s can be palindrome after deleting at most one character from it. https://leetcode.cn/problems/valid-palindrome-ii/ Example 1: Input: s = "aba" Output: true Example 2: Input: s = "abca" Output: …

    easy
  • 1752. Check if Array Is Sorted and Rotated

    Coding

    #Problem Given an array nums, return true if the array was originally sorted in non-decreasing order, then rotated some number of positions (including zero). Otherwise, return false. There may be duplicates in the original array. Note: An …

    easy