加载中...
分类详情
困难 分类
458-可怜的小猪(Poor Pigs)
原文链接: 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…
2021-12-03
460-LFU 缓存(LFU Cache)
原文链接: 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…
2021-12-03
479-最大回文数乘积(Largest Palindrome Product)
原文链接: 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…
2021-12-03
483-最小好进制(Smallest Good Base)
原文链接: 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…
2021-12-03
502-IPO
原文链接: 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…
2021-12-03
517-超级洗衣机(Super Washing Machines)
原文链接: 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…
2021-12-03
587-安装栅栏(Erect the Fence)
原文链接: 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…
2021-12-03
591-标签验证器(Tag Validator)
原文链接: 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…
2021-12-03
601-体育馆的人流量(Human Traffic of Stadium)
原文链接: https://leetcode-cn.com/problems/human-traffic-of-stadium 英文原文Table: Stadium +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | visit_date | date | | people | int | +---------------+---------+ visit_da…
2021-12-03
629-K个逆序对数组(K Inverse Pairs Array)
原文链接: 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 …
2021-12-03
639-解码方法 II(Decode Ways II)
原文链接: 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…
2021-12-03
664-奇怪的打印机(Strange Printer)
原文链接: 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…
2021-12-03