GoCalf Calf 的自留地 · 昙花一现

全站内容

easy

  • 145. Binary Tree Postorder Traversal

    Coding

    #Problem Given the root of a binary tree, return the postorder traversal of its nodes’ values. https://leetcode.com/problems/binary-tree-postorder-traversal/ Example 1: Input: root = [1,null,2,3] Output: [3,2,1] Explanation: case1Example 2: …

    easy
  • 3285. Find Indices of Stable Mountains

    Coding

    #Problem There are n mountains in a row, and each mountain has a height. You are given an integer array height where height[i] represents the height of mountain i, and an integer threshold. A mountain is called stable if the mountain just …

    easy
  • 496. Next Greater Element I

    Coding

    #Problem The next greater element of some element x in an array is the first greater element that is to the right of x in the same array. You are given two distinct 0-indexed integer arrays nums1 and nums2, where nums1 is a subset of nums2. …

    easy
  • 1475. Final Prices With a Special Discount in a Shop

    Coding

    #Problem You are given an integer array prices where prices[i] is the price of the iᵗʰ item in a shop. There is a special discount for items in the shop. If you buy the iᵗʰ item, then you will receive a discount equivalent to prices[j] …

    easy
  • 3264. Final Array State After K Multiplication Operations I

    Coding

    #Problem You are given an integer array nums, an integer k, and an integer multiplier. You need to perform k operations on nums. In each operation: Find the minimum value x in nums. If there are multiple occurrences of the minimum value, …

    easy
  • 2558. Take Gifts From the Richest Pile

    Coding

    #Problem You are given an integer array gifts denoting the number of gifts in various piles. Every second, you do the following: Choose the pile with the maximum number of gifts. If there is more than one pile with the maximum number of …

    easy
  • 2717. Semi-Ordered Permutation

    Coding

    #Problem You are given a 0-indexed permutation of n integers nums. A permutation is called semi-ordered if the first number equals 1 and the last number equals n. You can perform the below operation as many times as you want until you make …

    easy
  • 3151. Special Array I

    Coding

    #Problem An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You are given an array of integers nums. Return true if nums is a special array, otherwise, return false. …

    easy
  • 1812. Determine Color of a Chessboard Square

    Coding

    #Problem You are given coordinates, a string that represents the coordinates of a square of the chessboard. Below is a chessboard for your reference. problemReturn true if the square is white, and false if the square is black. The …

    easy
  • 999. Available Captures for Rook

    Coding

    #Problem You are given an 8 x 8 matrix representing a chessboard. There is exactly one white rook represented by 'R', some number of white bishops 'B', and some number of black pawns 'p'. Empty squares are represented by '.'. A rook can …

    easy