In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. ...
分类:
其他好文 时间:
2020-07-29 15:35:58
阅读次数:
76
一、异常的分类 二、常见的异常 三、打印异常的三种方式 运行结果: java.lang.ArithmeticException: / by zeroat test3.Test.main(Test.java:6) 2 java.lang.ArithmeticException: / by zero 3 ...
分类:
编程语言 时间:
2020-07-29 10:13:23
阅读次数:
62
当出现这种错误是,处理起来还是比较简单的,可以通过给出的信息得到代码中个除数为0了,只需要对代码中除数为0的代码进行处理 ...
分类:
编程语言 时间:
2020-07-29 10:09:15
阅读次数:
51
【螺旋矩阵】三部曲:1、[ 找到 m、n ] 2、[ 开二维数组填充矩阵 ] 3、[ 输出矩阵 ] 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 bool cmp(int a, int b) { return a > b; } 5 6 in ...
分类:
其他好文 时间:
2020-07-28 22:39:21
阅读次数:
70
Leetcode.283 Move Zeroes Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero e ...
分类:
编程语言 时间:
2020-07-28 14:38:35
阅读次数:
91
题目描述: 方法一:动态规划 O(mnlogmn) class Solution(object): def longestIncreasingPath(self, matrix): if not matrix or not matrix[0]: return 0 m, n = len(matrix) ...
分类:
其他好文 时间:
2020-07-27 15:46:06
阅读次数:
70
Linux的虚拟机碎片整理 sudo dd if=/dev/zero of=/free bs=1M sudo rm -f /free 镜像压缩 --转换vdi VboxManage clonehd "F:\VirtualBox VMs\atguigu\atguigu-disk001.vmdk" "F ...
分类:
其他好文 时间:
2020-07-27 15:36:36
阅读次数:
81
本体考察数组的使用。注意本体使用vector的指针形式。 C++版 #include <iostream> #include <vector> #include <algorithm> using namespace std; void printMatrixInCircle(vector<vect ...
分类:
其他好文 时间:
2020-07-27 13:53:20
阅读次数:
79
<el-tag :type="tagData 'all' ? '' : 'warning'" effect="dark" @click="toggleTag('all')">全部</el-tag> <el-tag :type="tagData 'undone' ? '' : 'warning' " ...
分类:
其他好文 时间:
2020-07-26 19:06:47
阅读次数:
68
1.1题目 给定一个整数矩阵,找出最长递增路径的长度。对于每个单元格,你可以往上,下,左,右四个方向移动。 你不能在对角线方向上移动或移动到边界外(即不允许环绕)。 示例1: 示例2: 1.2解答 很显然只能将所有情况完全遍历一次,将以任意一点为起点的情况全部遍历完,也就是对每个点进行深度优先搜索。 ...
分类:
其他好文 时间:
2020-07-26 15:08:01
阅读次数:
51