题目: 解答: 方法一:会超时间 1 class Solution { 2 public: 3 void rotate(vector<vector<int>>& matrix) 4 { 5 // 思路是: 转置 + 反转每一行 6 7 int len = matrix.size(); 8 9 // ...
分类:
编程语言 时间:
2020-05-05 20:09:54
阅读次数:
66
题目: 解答: 按杨氏矩阵的方法求解,时间复杂度为O(m+n),其中m为矩阵的行数,n为矩阵的列数。 1 class Solution { 2 public: 3 bool searchMatrix(vector<vector<int>>& matrix, int target) 4 { 5 if( ...
分类:
其他好文 时间:
2020-05-05 12:37:47
阅读次数:
47
平滑技术也叫做过滤技术,可以用来去除图像中的噪声,常用的平滑处理的处理算法有基于二维离散卷积的高斯平滑、均值平衡、基于统计学方法的中值平滑、双边滤波、导向滤波等。二维离散卷积是基于两个矩阵的一种计算方式,通过以下示例进行理解。 $$ I = \left ( \begin{matrix} 1&2\\ ...
分类:
其他好文 时间:
2020-05-05 11:05:15
阅读次数:
61
定义卷积矩阵$M=$ $$\begin{matrix} a_0&0&0&...\\ a_1&a_0&0&...\\ a_2&a_1&a_0&...\\ ...&...&...&...\\ \end{matrix}$$ 幂和矩阵:$A=$ $$\begin{matrix} 1&1&1&...\\ x_ ...
分类:
其他好文 时间:
2020-05-04 21:13:22
阅读次数:
56
```python import pandas as pd # 两个数据类型:Series = 索引+一维数据、DataFrame = 行列索引+二维数据 Series类型:一组数据及与之相关的数据索引组成 # pd.Series(values, index=[]) # index自定义索引 Dat... ...
分类:
其他好文 时间:
2020-05-04 19:42:43
阅读次数:
77
用递归实现回溯法 注意:对于越界的检查是row>=matrix.length和col>=matrix[0].length要加上等号(这个错误找了半个小时呜呜呜) public class Solution { private int[][] act = {{0,1},{0,-1},{-1,0},{1 ...
分类:
其他好文 时间:
2020-05-04 17:23:52
阅读次数:
53
常常会碰到各种各样时间序列预测问题,如商场人流量的预测、商品价格的预测、股价的预测,等等。TensorFlow新引入了一个TensorFlow Time Series库(以下简称为TFTS),它可以帮助在TensorFlow中快速搭建高性能的时间序列预测系统,并提供包括AR、LSTM在内的多个模型。 ...
分类:
其他好文 时间:
2020-05-03 23:08:54
阅读次数:
136
题目 https://leetcode cn.com/problems/find the kth smallest sum of a matrix with sorted rows/ 给你一个 m n 的矩阵 mat,以及一个整数 k ,矩阵中的每一行都以非递减的顺序排列。 你可以从每一行中选出 1 ...
分类:
编程语言 时间:
2020-05-03 20:16:18
阅读次数:
80
link class Solution { public: struct Comp{ bool operator()(vector<int>& v1, vector<int>& v2){ return v1[0]+v1[1]>v2[0]+v2[1]; } }; int kthSmallest(vec ...
分类:
其他好文 时间:
2020-05-03 20:13:29
阅读次数:
92
题目描述 Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of co ...
分类:
其他好文 时间:
2020-05-03 18:40:49
阅读次数:
162