问题:Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example,If n = 4 and k = 2, a solution is: [ [2,4], [3, ...
分类:
其他好文 时间:
2020-06-06 01:16:22
阅读次数:
93
题目 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字。 输入:matrix = [[1,2,3],[4,5,6],[7,8,9]] 输出:[1,2,3,6,9,8,7,4,5] class Solution { public: vector<int> spiralOrder(vecto ...
分类:
其他好文 时间:
2020-06-06 01:09:30
阅读次数:
92
题目描述 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字。 示例 1: 输入:matrix = [[1,2,3],[4,5,6],[7,8,9]] 输出:[1,2,3,6,9,8,7,4,5] 示例 2: 输入:matrix = [[1,2,3,4],[5,6,7,8],[9,10,1 ...
分类:
其他好文 时间:
2020-06-05 12:55:05
阅读次数:
55
遍历添加 思路: 由于原数组有序,可以遍历把要添加区间之前的区间先加入到结果中,在判断要添加的区间是否能和之前合并,接着继续遍历之后区间,如果能合并就合并区间,不能合并直接添加。合并区间方法,参考56.合并区间 代码: class Solution: def insert(self, interva ...
分类:
其他好文 时间:
2020-06-05 12:54:11
阅读次数:
47
当前使用RN版本号: 0.62.2 ,将项目打包release 的 apk 时 ,安装后打开App闪退,完整错误如下:
分类:
其他好文 时间:
2020-06-05 10:29:19
阅读次数:
512
from google.colab import drive drive.mount('/content/gdrive') pip install --upgrade visdom pip install torchxrayvision #进入指定文件夹BreastCancer_FinalVersi ...
分类:
其他好文 时间:
2020-06-05 00:42:06
阅读次数:
91
yi开始自己想的 class Solution { public int[] productExceptSelf(int[] nums) { int[] res=new int[nums.length]; int sum=1; for(int num:nums){ sum =sum*num; } f ...
分类:
其他好文 时间:
2020-06-05 00:34:59
阅读次数:
67
class Solution { public int pivotIndex(int[] nums) { int sumLeft = 0; int sum = 0; for (int i = 0; i < nums.length; i++) { sum += nums[i]; } for (int ...
分类:
编程语言 时间:
2020-06-05 00:31:24
阅读次数:
64
题目描述: 给你两个有序整数数组 nums1 和 nums2,请你将 nums2 合并到 nums1 中,使 nums1 成为一个有序数组。 思路一:直接利用python中的sorted()函数 class Solution: def merge(self, nums1: List[int], m: ...
分类:
编程语言 时间:
2020-06-04 21:44:49
阅读次数:
77
package LeetCode_1365 import java.util.* /** * 1365. How Many Numbers Are Smaller Than the Current Number * https://leetcode.com/problems/how-many-num ...
分类:
其他好文 时间:
2020-06-04 19:56:56
阅读次数:
67