一.画图查看缺失值分布情况 方法1 import missingno as msno # pip install missingno msno.matrix(train_data); 方法2 缺失值高亮 # matplotlib画缺失值 plt.imshow(train_data.isna(),as ...
分类:
其他好文 时间:
2020-02-20 22:18:31
阅读次数:
140
40. 顺时针打印矩阵 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字。 class Solution { public: vector<int> res; vector<vector<int> > mp; vector<vector<bool> > vis; int m, n; vo ...
分类:
其他好文 时间:
2020-02-20 17:27:00
阅读次数:
96
先左右对称反转,再沿右对角线对折,面试记住就行了 代码: 1 class Solution { 2 public: 3 void rotate(vector<vector<int>>& matrix) { 4 int len = matrix.size(); 5 //左右翻 6 for(int i= ...
分类:
其他好文 时间:
2020-02-20 10:13:45
阅读次数:
76
public class Solution { /** * @param costs: n x 3 cost matrix * @return: An integer, the minimum cost to paint all houses */ public int minCost(int[][ ...
分类:
其他好文 时间:
2020-02-19 21:05:47
阅读次数:
63
常用测量矩阵及matlab实现 随机高斯测量矩阵 function [ Phi ] = GaussMtx( M,N ) %GaussMtx Summary of this function goes here %Generate Bernoulli matrix %M -- RowNumber %N ...
分类:
其他好文 时间:
2020-02-19 15:24:44
阅读次数:
96
给定M×N矩阵,每一行、每一列都按升序排列,请编写代码找出某元素。 示例: 现有矩阵 matrix 如下: [ [1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26 ...
分类:
编程语言 时间:
2020-02-18 16:33:23
阅读次数:
90
一、定义动画过程中形成的状态用transformtransform 分为2D 和 3D,主要包含以下几种变换:旋转rotate、扭曲skew、缩放scale和移动 translate以及矩阵变形matrix,语法如下:1transform: rotate | scale | skew | trans... ...
分类:
其他好文 时间:
2020-02-18 13:24:01
阅读次数:
68
Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise. Return the number of negative numbers in grid. Exampl ...
分类:
其他好文 时间:
2020-02-18 13:04:04
阅读次数:
75
给定 $n$ 个点 $k$ 棵树的森林,第 $i$ 棵树的大小为 $s_i$,要求加入 $k 1$ 条边,使之连通,求方案数。 设第 $i$ 棵树的度数为 $d_i$,则对于给定 $d_1,d_2,\cdots,d_k$,根据 prufer 序列 ,进行可重集排列 $$ \begin{pmatrix ...
分类:
其他好文 时间:
2020-02-15 13:32:00
阅读次数:
84
1 """ 2 Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. 3 The distance between two adjacent cells is 1. 4 Exampl ...
分类:
其他好文 时间:
2020-02-15 11:50:37
阅读次数:
74