LeetCode Weekly Contest 52是LeetCode举办的第五十六场正式周赛,共4道题目,比赛时长1.5小时。
比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-52/
题解列表:
LeetCode 686. Repeated String Match
LeetCode 687. Longest Univalue Path
LeetCode Weekly Contest 52是LeetCode举办的第五十六场正式周赛,共4道题目,比赛时长1.5小时。
比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-52/
题解列表:
LeetCode 686. Repeated String Match
LeetCode 687. Longest Univalue Path
LeetCode 689. Maximum Sum of 3 Non-Overlapping Subarrays
In a given array nums
of positive integers, find three non-overlapping subarrays with maximum sum.
Each subarray will be of size k
, and we want to maximize the sum of all ...
LeetCode 688. Knight Probability in Chessboard
On an N
xN
chessboard, a knight starts at the r
-th row and c
-th column and attempts to make exactly K
moves. The rows and columns are 0 indexed, so ...
LeetCode 687. Longest Univalue Path
Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the root.
Note: The length ...
LeetCode 686. Repeated String Match
Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1.
For example, with ...