题目描述:
LeetCode 829. Consecutive Numbers Sum
Given a positive integer N
, how many ways can we write it as a sum of consecutive positive integers?
Example 1:
Input: 5 Output: 2 Explanation: 5 = 5 = 2 + 3
Example 2:
Input: 9 Output ...
LeetCode 829. Consecutive Numbers Sum
Given a positive integer N
, how many ways can we write it as a sum of consecutive positive integers?
Example 1:
Input: 5 Output: 2 Explanation: 5 = 5 = 2 + 3
Example 2:
Input: 9 Output ...
LeetCode 831. Masking Personal Information
We are given a personal information string S
, which may represent either an email address or a phone number.
We would like to mask this personal information according to the following rules:
1. Email address:
We define a ...
LeetCode 830. Positions of Large Groups
In a string S
of lowercase letters, these letters form consecutive groups of the same character.
For example, a string like S = "abbxxxxzyy"
has the groups "a"
, "bb"
, "xxxx"
, "z"
and "yy"
.
Call ...
LeetCode 827. Making A Large Island
In a 2D grid of 0
s and 1
s, we change at most one 0
to a 1
.
After, what is the size of the largest island? (An island is a ...
LeetCode 826. Most Profit Assigning Work
We have jobs: difficulty[i]
is the difficulty of the i
th job, and profit[i]
is the profit of the i
th job.
Now we have some workers. worker[i ...