加载中...
分类详情
简单 分类
455-分发饼干(Assign Cookies)
原文链接: https://leetcode-cn.com/problems/assign-cookies 英文原文Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor g[i], which is the minimum siz…
2021-12-03
461-汉明距离(Hamming Distance)
原文链接: https://leetcode-cn.com/problems/hamming-distance 英文原文The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, return the Hamming distance between them. Exam…
2021-12-03
476-数字的补数(Number Complement)
原文链接: https://leetcode-cn.com/problems/number-complement 英文原文The complement of an integer is the integer you get when you flip all the 0's to 1's and all the 1's to 0's in its binary representation. For example, The integer 5 is "101" in binary and i…
2021-12-03
482-密钥格式化(License Key Formatting)
原文链接: https://leetcode-cn.com/problems/license-key-formatting 英文原文You are given a license key represented as a string s that consists of only alphanumeric characters and dashes. The string is separated into n + 1 groups by n dashes. You are also give…
2021-12-03
485-最大连续 1 的个数(Max Consecutive Ones)
原文链接: https://leetcode-cn.com/problems/max-consecutive-ones 英文原文Given a binary array nums, return the maximum number of consecutive 1's in the array. Example 1: Input: nums = [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three…
2021-12-03
492-构造矩形(Construct the Rectangle)
原文链接: https://leetcode-cn.com/problems/construct-the-rectangle 英文原文A web developer needs to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose lengt…
2021-12-03
495-提莫攻击(Teemo Attacking)
原文链接: https://leetcode-cn.com/problems/teemo-attacking 英文原文Our hero Teemo is attacking an enemy Ashe with poison attacks! When Teemo attacks Ashe, Ashe gets poisoned for a exactly duration seconds. More formally, an attack at second t will mean Ashe …
2021-12-03
500-键盘行(Keyboard Row)
原文链接: https://leetcode-cn.com/problems/keyboard-row 英文原文Given an array of strings words, return the words that can be typed using letters of the alphabet on only one row of American keyboard like the image below. In the American keyboard: the first r…
2021-12-03
504-七进制数(Base 7)
原文链接: https://leetcode-cn.com/problems/base-7 英文原文Given an integer num, return a string of its base 7 representation. Example 1: Input: num = 100 Output: "202" Example 2: Input: num = -7 Output: "-10" Constraints: -107 <= num <= 107 中文题目给定一个整数 num,将其…
2021-12-03
507-完美数(Perfect Number)
原文链接: https://leetcode-cn.com/problems/perfect-number 英文原文A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. A divisor of an integer x is an integer that can divide x evenly. Given a…
2021-12-03
520-检测大写字母(Detect Capital)
原文链接: https://leetcode-cn.com/problems/detect-capital 英文原文We define the usage of capitals in a word to be right when one of the following cases holds: All letters in this word are capitals, like "USA". All letters in this word are not capitals, like …
2021-12-03
541-反转字符串 II(Reverse String II)
原文链接: https://leetcode-cn.com/problems/reverse-string-ii 英文原文Given a string s and an integer k, reverse the first k characters for every 2k characters counting from the start of the string. If there are fewer than k characters left, reverse all of th…
2021-12-03
551-学生出勤记录 I(Student Attendance Record I)
原文链接: https://leetcode-cn.com/problems/student-attendance-record-i 英文原文You are given a string s representing an attendance record for a student where each character signifies whether the student was absent, late, or present on that day. The record on…
2021-12-03
566-重塑矩阵(Reshape the Matrix)
原文链接: https://leetcode-cn.com/problems/reshape-the-matrix 英文原文In MATLAB, there is a handy function called reshape which can reshape an m x n matrix into a new one with a different size r x c keeping its original data. You are given an m x n matrix ma…
2021-12-03
575-分糖果(Distribute Candies)
原文链接: https://leetcode-cn.com/problems/distribute-candies 英文原文Alice has n candies, where the ith candy is of type candyType[i]. Alice noticed that she started to gain weight, so she visited a doctor. The doctor advised Alice to only eat n / 2 of the …
2021-12-03
595-大的国家(Big Countries)
原文链接: https://leetcode-cn.com/problems/big-countries 英文原文Table: World +-------------+---------+ | Column Name | Type | +-------------+---------+ | name | varchar | | continent | varchar | | area | int | | population | int | | gdp | int | +-----------…
2021-12-03