LeetCode: Weekly Contest 93

LeetCode: Weekly Contest 93

题解列表

1. LeetCode: 868. Binary Gap 题解

这是签到题,直接计算转换为二进制数后的相邻 1 的距离,记录距离最远的 1 的距离。

2. LeetCode: 869. Reordered Power of 2 题解

通过深度优先搜索遍历所有排列的可能性,然后将其转换为二进制数,如果转换的二进制数只有一个 1 则是二的倍数。

3. LeetCode: 870. Advantage Shuffle 题解

为 B 数组中的每个数字找到与之对应 A 数组中大于它的最小值,如果没有则将其设为 A 数组中没处理数据的最小值。

4. LeetCode: 871. Minimum Number of Refueling Stops 题解

猜你喜欢

转载自blog.csdn.net/yanglingwell/article/details/81051176