原文链接: https://leetcode-cn.com/problems/strong-password-checker 英文原文A password is considered strong if the below conditions are all met: It has at least 6 characters and at most 20 characters. It contains at least one lowercase letter, at least one up…
分类详情
困难 分类
原文链接: https://leetcode-cn.com/problems/all-oone-data-structure 英文原文Design a data structure to store the strings' count with the ability to return the strings with minimum and maximum counts. Implement the AllOne class: AllOne() Initializes the object…
原文链接: https://leetcode-cn.com/problems/k-th-smallest-in-lexicographical-order 英文原文Given two integers n and k, return the kth lexicographically smallest integer in the range [1, n]. Example 1: Input: n = 13, k = 2 Output: 10 Explanation: The lexicogra…
原文链接: https://leetcode-cn.com/problems/arithmetic-slices-ii-subsequence 英文原文Given an integer array nums, return the number of all the arithmetic subsequences of nums. A sequence of numbers is called arithmetic if it consists of at least three element…
原文链接: https://leetcode-cn.com/problems/poor-pigs 英文原文There are buckets buckets of liquid, where exactly one of the buckets is poisonous. To figure out which one is poisonous, you feed some number of (poor) pigs the liquid to see whether they will die…
原文链接: https://leetcode-cn.com/problems/lfu-cache 英文原文Design and implement a data structure for a Least Frequently Used (LFU) cache. Implement the LFUCache class: LFUCache(int capacity) Initializes the object with the capacity of the data structure. i…
原文链接: https://leetcode-cn.com/problems/count-the-repetitions 英文原文We define str = [s, n] as the string str which consists of the string s concatenated n times. For example, str == ["abc", 3] =="abcabcabc". We define that string s1 can be obtained from…
原文链接: https://leetcode-cn.com/problems/concatenated-words 英文原文Given an array of strings words (without duplicates), return all the concatenated words in the given list of words. A concatenated word is defined as a string that is comprised entirely of…
原文链接: https://leetcode-cn.com/problems/largest-palindrome-product 英文原文Given an integer n, return the largest palindromic integer that can be represented as the product of two n-digits integers. Since the answer can be very large, return it modulo 133…
原文链接: https://leetcode-cn.com/problems/sliding-window-median 英文原文The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle values. For examples, i…
原文链接: https://leetcode-cn.com/problems/smallest-good-base 英文原文Given an integer n represented as a string, return the smallest good base of n. We call k >= 2 a good base of n, if all digits of n base k are 1's. Example 1: Input: n = "13" Output: "3" E…
原文链接: https://leetcode-cn.com/problems/zuma-game 英文原文You are playing a variation of the game Zuma. In this variation of Zuma, there is a single row of colored balls on a board, where each ball can be colored red 'R', yellow 'Y', blue 'B', green 'G', …
原文链接: https://leetcode-cn.com/problems/kth-smallest-instructions 英文原文Bob is standing at cell (0, 0), and he wants to reach destination: (row, column). He can only travel right and down. You are going to help Bob by providing instructions for him to r…
原文链接: https://leetcode-cn.com/problems/reverse-pairs 英文原文Given an integer array nums, return the number of reverse pairs in the array. A reverse pair is a pair (i, j) where 0 <= i < j < nums.length and nums[i] > 2 * nums[j]. Example 1: Input: nums = …
原文链接: https://leetcode-cn.com/problems/ipo 英文原文Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects to increase its capital before the IPO. Since it has…
原文链接: https://leetcode-cn.com/problems/freedom-trail 英文原文In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring" and use the dial to spell a specific keyword to open the door. Gi…
原文链接: https://leetcode-cn.com/problems/super-washing-machines 英文原文You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty. For each move, you could choose any m (1 <= m <= n) washing machines, and pas…
原文链接: https://leetcode-cn.com/problems/remove-boxes 英文原文You are given several boxes with different colors represented by different positive numbers. You may experience several rounds to remove boxes until there is no box left. Each time you can choos…
原文链接: https://leetcode-cn.com/problems/student-attendance-record-ii 英文原文An attendance record for a student can be represented as a string where each character signifies whether the student was absent, late, or present on that day. The record only con…
原文链接: https://leetcode-cn.com/problems/find-the-closest-palindrome 英文原文Given a string n representing an integer, return the closest integer (not including itself), which is a palindrome. If there is a tie, return the smaller one. The closest is defin…
原文链接: https://leetcode-cn.com/problems/erect-the-fence 英文原文You are given an array trees where trees[i] = [xi, yi] represents the location of a tree in the garden. You are asked to fence the entire garden using the minimum length of rope as it is expe…
原文链接: https://leetcode-cn.com/problems/tag-validator 英文原文Given a string representing a code snippet, implement a tag validator to parse the code and return whether it is valid. A code snippet is valid if all the following rules hold: The code must be…
原文链接: https://leetcode-cn.com/problems/non-negative-integers-without-consecutive-ones 英文原文Given a positive integer n, return the number of the integers in the range [0, n] whose binary representations do not contain consecutive ones. Example 1: Input…
原文链接: https://leetcode-cn.com/problems/human-traffic-of-stadium 英文原文Table: Stadium +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | visit_date | date | | people | int | +---------------+---------+ visit_da…
原文链接: https://leetcode-cn.com/problems/k-inverse-pairs-array 英文原文For an integer array nums, an inverse pair is a pair of integers [i, j] where 0 <= i < j < nums.length and nums[i] > nums[j]. Given two integers n and k, return the number of different …
原文链接: https://leetcode-cn.com/problems/course-schedule-iii 英文原文There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [durationi, lastDayi] indicate that the ith course should be taken continuousl…
原文链接: https://leetcode-cn.com/problems/smallest-range-covering-elements-from-k-lists 英文原文You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists. We define the ra…
原文链接: https://leetcode-cn.com/problems/decode-ways-ii 英文原文A message containing letters from A-Z can be encoded into numbers using the following mapping: 'A' -> "1" 'B' -> "2" ... 'Z' -> "26" To decode an encoded message, all the digits must be groupe…
原文链接: https://leetcode-cn.com/problems/strange-printer 英文原文There is a strange printer with the following two special properties: The printer can only print a sequence of the same character each time. At each turn, the printer can print new characters…
原文链接: https://leetcode-cn.com/problems/kth-smallest-number-in-multiplication-table 英文原文Nearly everyone has used the Multiplication Table. The multiplication table of size m x n is an integer matrix mat where mat[i][j] == i * j (1-indexed). Given thre…