A: leetcode 1431. 拥有最多糖果的孩子

1. 递归

 $childCandy) {
                if($current == $childIndex) {
                    if ($max > $childCandy + $extraCandies) {
                        $res[$childIndex] = false;
                    } else {
                        $res[$childIndex] = true;
                    }
                }
            }
            $current++;
        }
        return $res;
    }
}

你可能感兴趣的:(2023ARTS打卡,leetcode,算法,职场和发展)