1431. 拥有最多糖果的孩子 难度简单 给你一个数组 candies 和一个整数 extraCandies ,其中 candies[i] 代表第 i 个孩子拥有的糖果数目。 对每一个孩子,检查是否存在一种方案,将额外的 extraCandies 个糖果分配给孩子们之后,此孩子有 最多 的糖果。注意 ...
分类:
其他好文 时间:
2020-06-22 20:48:49
阅读次数:
65
题目来源于力扣(LeetCode) 一、题目 989. 数组形式的整数加法 题目相关标签:数组 提示: 1 ? A.length ? 10000 0 ? A[i] ? 9 0 ? K ? 10000 如果 A.length > 1,那么 A[0] != 0 二、解题思路 2.1 数字相加 定义变量 ...
分类:
编程语言 时间:
2020-06-22 20:48:06
阅读次数:
60
题目如下: Given an integer n and an integer start. Define an array nums where nums[i] = start + 2*i (0-indexed) and n == nums.length. Return the bitwise X ...
分类:
其他好文 时间:
2020-06-22 15:49:58
阅读次数:
98
题目如下: There are n cities numbered from 0 to n-1 and n-1 roads such that there is only one way to travel between two different cities (this network for ...
分类:
其他好文 时间:
2020-06-22 15:47:54
阅读次数:
60
Your country has an infinite number of lakes. Initially, all the lakes are empty, but when it rains over the nth lake, the nth lake becomes full of wa ...
分类:
其他好文 时间:
2020-06-22 15:46:01
阅读次数:
58
题目如下: Given the array of integers nums, you will choose two different indices i and j of that array. Return the maximum value of (nums[i]-1)*(nums[j]- ...
分类:
其他好文 时间:
2020-06-22 15:42:18
阅读次数:
67
题目如下: Given a rectangular cake with height h and width w, and two arrays of integers horizontalCuts and verticalCuts where horizontalCuts[i] is the di ...
分类:
其他好文 时间:
2020-06-22 15:31:47
阅读次数:
45
题目如下: Given an array of integers arr and an integer k. Find the least number of unique integers after removing exactly k elements. Example 1: Input: a ...
分类:
其他好文 时间:
2020-06-22 15:12:41
阅读次数:
60
点个赞,看一看,好习惯!本文GitHubhttps://github.com/OUYANGSIHAI/JavaInterview已收录,这是我花了3个月总结的一线大厂Java面试总结,本人已拿大厂offer。另外,原创文章首发在我的个人博客:blog.ouyangsihai.cn,欢迎访问。今天来聊聊dfs的解题方法,这些方法都是总结之后的出来的经验,有值得借鉴的地方。1从二叉树看dfs二叉树的思
分类:
其他好文 时间:
2020-06-22 14:48:14
阅读次数:
53
给你一个数组 nums 和一个值 val,你需要 原地 移除所有数值等于 val 的元素,并返回移除后数组的新长度。 ...
分类:
其他好文 时间:
2020-06-22 13:20:13
阅读次数:
32