最新 最热

Leetcode 题目解析之 Perfect Squares

Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.

2022-01-15
1

Leetcode 题目解析之 Number of Digit One

Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.

2022-01-15
0

Leetcode 题目解析之 Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string.

2022-01-15
0

Leetcode 题目解析之 Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.

2022-01-14
1

Leetcode 题目解析之 Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add...

2022-01-14
0

Leetcode 题目解析之 Happy Number

Write an algorithm to determine if a number is "happy".

2022-01-10
0

Leetcode 题目解析之 Count Primes

As you can see, calculations of 4 × 3 and 6 × 2 are not necessary. Therefore, we only need to consider factors up to √n because, if n is divisible by some numbe...

2022-01-10
1

Leetcode 题目解析之 Next Permutation

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.

2022-01-09
0

Leetcode 题目解析之 Missing Number

Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.

2022-01-09
0

Leetcode 题目解析之 Minimum Path Sum

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.

2022-01-09
0