NO.31 简单 (1821. 寻找今年具有正收入的客户) https://leetcode-cn.com/problems/find-customers-with-positive-revenue-this-year/ # 简单 SELECT customer_id FROM Customers WHERE year=2021 AND revenue > 0 NO.32 中等 (1204. 最后一个能进入电梯的人) https://leetcode-cn.com/problems/last-person...
// Solution 1: A hard problem indeed. If there're redundant (s, what you gonna do? Remove it. If it's )s, what then? We can't remove them, because they might be needed later. This is the first challenge. The problem requests we find all possible solutions, that's the second ch...
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
1. 两数之和 - 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案,并且你不能使用两次相同的元素。 你可以按任意顺序返回答案。 示例 1: 输入
fetch-problem-list.bash ✨ add problem list fetcher August 3, 2022 12:16 gen-readme.pl ✨ categorize languages July 6, 2023 14:16 README.md leetcode My LeetCode submissions Easy: 111 / 696 Medium: 88 / 1480 Hard: 7 / 611 Index C++ No.DifficultyTitleCodeTime complexitySpace comp...
1331.go optimized for problem 1331 using map February 25, 2020 16:40 1332.go problem 1332: remove palindromic subsequences February 25, 2020 17:06 1337.go problem 1337: the k weakest rows in a matrix February 25, 2020 23:35 1342.go problem 1342: number of steps to reduce a ...
请你设计并实现一个满足LRU (最近最少使用) 缓存约束的数据结构。 实现LRUCache类: LRUCache(int capacity)以正整数作为容量capacity初始化 LRU 缓存 int get(int key)如果关键字key存在于缓存中,则返回关键字的值,否则返回-1。 void put(int key, int value)如果关键字key已经存在,则变更其数据值value;如果...
Problem: There are a row ofnhouses, each house can be painted with one of thekcolors. The cost of painting each house with a certain color is different. You have to paint all the houses such that no two adjacent houses have the same color. ...
(,, ): HDU 1542 Atlantis update: query: HDU 1828 Picture update: query: Title Solution Difficulty Time Space O(n log 218. The Skyline Problem Go Hard O(n) n) 307. Range Sum Query - Go Hard O(1) O(n) Mutable 315. Count of Smaller O(n log Go Hard O(n) Numbers After Self ...
注意:本题和 1038: leetcode-cn.com/problem 相同 示例1: 输入:[4,1,6,0,2,5,7,null,null,null,3,null,null,null,8] 输出:[30,36,21,36,35,26,15,null,null,null,33,null,null,null,8] 示例2: 输入:root = [0,null,1] 输出:[1,null,1] 示例3: 输入:root = [1,0,2] 输出:[3...