leetcode
leetcode copied to clipboard
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
Given an array of integers `arr`, you are initially positioned at the first index of the array. In one step you can jump from index `i` to index: * `i...
Given two numbers, `hour` and `minutes`, return _the smaller angle (in degrees) formed between the _`hour`_ and the _`minute`_ hand_. Answers within `10-5` of the actual value will be accepted...
Given an array of integers `arr` and two integers `k` and `threshold`, return *the number of sub-arrays of size _`k`_ and average greater than or equal to *`threshold`. **Example 1:**...
Given an integer `num`, return _the number of steps to reduce it to zero_. In one step, if the current number is even, you have to divide it by `2`,...
Given an array of integers `arr` and an integer `d`. In one step you can jump from index `i` to index: * `i + x` where: `i + x <...
Given the `root` of a binary tree, split the binary tree into two subtrees by removing one edge such that the product of the sums of the subtrees is maximized....
Given two words ( _beginWord_ and _endWord_ ), and a dictionary's word list, find all shortest transformation sequence(s) from _beginWord_ to _endWord_ , such that: 1. Only one letter can...
Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. Example : Input: root = [5,1,5,5,5,null,5] 5...
Given a string `s` and a string array `dictionary`, return _the longest string in the dictionary that can be formed by deleting some of the given string characters_. If there...
You are given the `root` of a binary tree with `n` nodes, where each node is uniquely assigned a value from `1` to `n`. You are also given a sequence...