leetcode
leetcode copied to clipboard
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
[请点击下方图片观看讲解视频](https://www.youtube.com/watch?v=bNWzfZAafDQ) [Click below image to watch YouTube Video](https://www.youtube.com/watch?v=bNWzfZAafDQ) [](https://www.youtube.com/watch?v=bNWzfZAafDQ) Given an array of integers `nums` and an integer `target`, return _indices of the two numbers such that they add up...
You are given an integer array `coins` representing coins of different denominations and an integer `amount` representing a total amount of money. Return _the fewest number of coins that you...
You are given two integer arrays `nums1` and `nums2` sorted in ascending order and an integer `k`. Define a pair `(u, v)` which consists of one element from the first...
Alex and Lee play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of...
Design an algorithm that accepts a stream of integers and retrieves the product of the last `k` integers of the stream. Implement the `ProductOfNumbers` class: * `ProductOfNumbers()` Initializes the object...
Given a `m x n` matrix `grid` which is sorted in non-increasing order both row-wise and column-wise, return _the number of **negative** numbers in_ `grid`. **Example 1:** **Input:** grid =...
Given a `m * n` matrix `seats` that represent seats distributions in a classroom. If a seat is broken, it is denoted by `'#'` character otherwise it is denoted by...
A social media company is trying to monitor activity on their site by analyzing the number of tweets that occur in select periods of time. These periods can be partitioned...
You are given two strings of the same length `s` and `t`. In one step you can choose **any character** of `t` and replace it with **another character**. Return _the...
Given an array `arr` of integers, check if there exist two indices `i` and `j` such that : * `i != j` * `0