题目描述:
Given a Binary Search Tree (BST) with root node root
, and a target value V
, split the tree into two subtrees where one subtree has nodes that are all smaller or equal to the target value ...
Given a Binary Search Tree (BST) with root node root
, and a target value V
, split the tree into two subtrees where one subtree has nodes that are all smaller or equal to the target value ...
LeetCode 779. K-th Symbol in Grammar
On the first row, we write a 0
. Now in every subsequent row, we look at the previous row and replace each occurrence of 0
with 01
, and each occurrence of 1
with ...
LeetCode Weekly Contest 69是LeetCode举办的第七十三场正式周赛,共4道题目,比赛时长1.5小时。
比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-69/
题解列表:
LeetCode 771. Jewels and Stones
LeetCode 774. Minimize Max Distance to Gas Station
On a horizontal number line, we have gas stations at positions stations[0], stations[1], ..., stations[N-1]
, where N = stations.length
.
Now, we add K
more gas stations so that D ...
On a 2x3 board
, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0.
A move consists of choosing 0
and a 4-directionally adjacent number and swapping ...