标签归档:leetcode

RSS feed of leetcode

[LeetCode]Binary Number with Alternating Bits

题目描述:

LeetCode 693. Binary Number with Alternating Bits

Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.

Example 1:

Input: 5
Output: True
Explanation:
The binary representation of 5 ...

继续阅读

LeetCode Weekly Contest 52解题报告

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 688. Knight Probability in Chessboard

LeetCode 689. Maximum Sum of 3 Non-Overlapping Subarrays

[LeetCode]Maximum Sum of 3 Non-Overlapping Subarrays

题目描述:

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 ...

继续阅读