原创 1358. Number of Substrings Containing All Three Characters
Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occu
原创 1383. Maximum Performance of a Team
There are n engineers numbered from 1 to n and two arrays: speed and efficiency, where speed[i] and efficiency[i]repres
原创 1392. Longest Happy Prefix
A string is called a happy prefix if is a non-empty prefix which is also a suffix (excluding itself). Given a string s.
原创 1387. Sort Integers by The Power Value
The power of an integer x is defined as the number of steps needed to transform x into 1 using the following steps: if
原创 1283. Find the Smallest Divisor Given a Threshold
Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the
原创 1406. Stone Game III
Alice and Bob continue their games with piles of stones. There are several stones arranged in a row, and each stone has
原创 1269. Number of Ways to Stay in the Same Place After Some Steps
You have a pointer at index 0 in an array of size arrLen. At each step, you can move 1 position to the left, 1 position
原创 1286. Iterator for Combination
Design an Iterator class, which has: A constructor that takes a string characters of sorted distinct lowercase English
原创 1404. Number of Steps to Reduce a Number in Binary Representation to One
Given a number s in their binary representation. Return the number of steps to reduce it to 1 under the following rules
原创 1344. Jump Game V
Given an array of integers arr and an integer d. In one step you can jump from index i to index: i + x where: i + x < a
原创 1349. Maximum Students Taking Exam
Given a m * n matrix seats that represent seats distributions in a classroom. If a seat is broken, it is denoted by '#
原创 LeetCode題解更新到微信公衆號了
歡迎感興趣的朋友關注!會不定期更新LeetCode Contest題解,也會對同類型問題進行歸納總結。 生命不息,coding不止!
原创 1443. Minimum Time to Collect All Apples in a Tree
Given an undirected tree consisting of n vertices numbered from 0 to n-1, which has some apples in their vertices. You
原创 1442. Count Triplets That Can Form Two Arrays of Equal XOR
Given an array of integers arr. We want to select three indices i, j and k where (0 <= i < j <= k < arr.length). Let's
原创 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
Given an array of integers nums and an integer limit, return the size of the longest continuous subarray such that the