zl程序教程

[LeetCode] Candy

  • leetcode 之Candy(12)

    leetcode 之Candy(12)

                   这题的思路很巧妙,分两遍扫描,将元素分别和左右元素相比较。               int candy(vector<int> &rattings) { i

    日期 2023-06-12 10:48:40     
  • (LeetCode 135) Candy

    (LeetCode 135) Candy

    There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at least one ca

    日期 2023-06-12 10:48:40     
  • (LeetCode 135) Candy

    (LeetCode 135) Candy

    There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at least one ca

    日期 2023-06-12 10:48:40     
  • Leetcode Candy

    Leetcode Candy

    https://oj.leetcode.com/problems/candy/ /* * *There are N children standing in a line. Each child is assigned a rating value. *You are giving candies to these children subjected to the following r

    日期 2023-06-12 10:48:40     
  • Leetcode: Candy

    Leetcode: Candy

    There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at least one

    日期 2023-06-12 10:48:40     
  • [LeetCode] Candy

    [LeetCode] Candy

    There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at le

    日期 2023-06-12 10:48:40     
  • 【LeetCode】135. Candy

    【LeetCode】135. Candy

    Candy There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have

    日期 2023-06-12 10:48:40     
  • [LeetCode] 888. Fair Candy Swap 公平糖果交换

    [LeetCode] 888. Fair Candy Swap 公平糖果交换

    Alice and Bob have candy bars of different sizes: `A[i]` is the size of the `i`-th bar of candy that Alice has, and `B[j]` is the size of the `j`-th bar of candy that B

    日期 2023-06-12 10:48:40     
  • [LeetCode] 723. Candy Crush 糖果消消乐

    [LeetCode] 723. Candy Crush 糖果消消乐

      This question is about implementing a basic elimination algorithm for Candy Crush. Given a 2D integer array board representing the grid of candy, different positive integers boa

    日期 2023-06-12 10:48:40     
  • [LeetCode] Candy 分糖果问题

    [LeetCode] Candy 分糖果问题

      There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must hav

    日期 2023-06-12 10:48:40     
  • leetcode 135. Candy 分发糖果(困难)

    leetcode 135. Candy 分发糖果(困难)

    一、题目大意 标签: 贪心 https://leetcode.cn/problems/candy n 个孩子站成一排。给你一个整数数组 ratings 表示每个孩子的评分。 你需要按照以下要求,给这些孩

    日期 2023-06-12 10:48:40