GoCalf Calf 的自留地 · 昙花一现

全站内容

medium

  • 3255. Find the Power of K-Size Subarrays II

    Coding

    跟 3254. Find the Power of K-Size Subarrays I 一模一样,只不过 n 的上限从 500 增加到 10⁵。 https://leetcode.cn/problems/find-the-power-of-k-size-subarrays-ii/

    medium
  • 633. Sum of Square Numbers

    Coding

    #Problem Given a non-negative integer c, decide whether there’re two integers a and b such that a² + b² = c. https://leetcode.cn/problems/sum-of-square-numbers/ Example 1: Input: c = 5 Output: true Explanation: 1 * 1 + 2 * 2 = 5 Example 2: …

    medium
  • 3208. Alternating Groups II

    Coding

    #Problem There is a circle of red and blue tiles. You are given an array of integers colors and an integer k. The color of tile i is represented by colors[i]: colors[i] == 0 means that tile i is red. colors[i] == 1 means that tile i is …

    medium
  • 638. Shopping Offers

    Coding

    #Problem In LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or more different kinds of items with a sale price. You are given an integer array …

    medium
  • 3259. Maximum Energy Boost From Two Drinks

    Coding

    #Problem You are given two integer arrays energyDrinkA and energyDrinkB of the same length n by a futuristic sports scientist. These arrays represent the energy boosts per hour provided by two different energy drinks, A and B, respectively. …

    medium
  • 2924. Find Champion II

    Coding

    #Problem There are n teams numbered from 0 to n - 1 in a tournament; each team is also a node in a DAG. You are given the integer n and a 0-indexed 2D integer array edges of length m representing the DAG, where edges[i] = [uᵢ, vᵢ] indicates …

    medium
  • 371. Sum of Two Integers

    Coding

    #Problem Given two integers a and b, return the sum of the two integers without using the operators + and -. https://leetcode.com/problems/sum-of-two-integers/ Example 1: Input: a = 1, b = 2 Output: 3 Example 2: Input: a = 2, b = 3 Output: …

    medium
  • 743. Network Delay Time

    Coding

    #Problem You are given a network of n nodes, labeled from 1 to n. You are also given times, a list of travel times as directed edges times[i] = (uᵢ, vᵢ, wᵢ), where uᵢ is the source node, vᵢ is the target node, and wᵢ is the time it takes …

    medium
  • 238. Product of Array Except Self

    Coding

    #Problem Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You …

    medium
  • 235. Lowest Common Ancestor of a Binary Search Tree

    Coding

    #Problem Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the …

    medium