- 时间:2020-09-09 14:04:20
- 分类:网络文摘
- 阅读:127 次
Given an array nums of 0s and 1s and an integer k, return True if all 1’s are at least k places away from each other, otherwise return False.
Example 1:
Input: nums = [1,0,0,0,1,0,0,1], k = 2
Output: true
Explanation: Each of the 1s... ...
- 时间:2020-09-09 14:04:20
- 分类:网络文摘
- 阅读:136 次
Let’s you have a list in Python:
1
a = [1, 2, 3, 4]
a = [1, 2, 3, 4]
And you have another list in Python:
1
b = [5, 6, 7, 8]
b = [5, 6, 7, 8]
You can concatenate two lists by simply using + operator, which will lea... ...
- 时间:2020-09-09 14:04:20
- 分类:网络文摘
- 阅读:102 次
- 时间:2020-09-09 13:16:32
- 分类:网络文摘
- 阅读:114 次
You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane.
Input: coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]]
Output: ... ...
- 时间:2020-09-09 13:16:32
- 分类:网络文摘
- 阅读:101 次
- 时间:2020-09-09 13:16:32
- 分类:网络文摘
- 阅读:116 次
- 时间:2020-09-09 13:16:32
- 分类:网络文摘
- 阅读:109 次
- 时间:2020-09-09 13:16:32
- 分类:网络文摘
- 阅读:118 次
- 时间:2020-09-09 13:16:32
- 分类:网络文摘
- 阅读:115 次
- 时间:2020-09-09 13:16:32
- 分类:网络文摘
- 阅读:116 次