https://leetcode.com/problems/spiral-matrix/ Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. ...
分类:
其他好文 时间:
2019-01-27 16:45:39
阅读次数:
157
https://leetcode.com/problems/spiral-matrix-ii/ Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order ...
分类:
其他好文 时间:
2019-01-27 16:39:33
阅读次数:
159
同步: 卡特兰数是个好东西 求法 1. $$ f(n)=\sum_{i=0}^{n 1}f(i)\cdot f(n 1 i) $$ 2. $$ f(n)=\frac{4n 2}{n+1}\cdot f(n 1) $$ 3. $$ f(n)=\frac{C\begin{matrix} n\\ 2n \ ...
分类:
其他好文 时间:
2019-01-27 14:31:26
阅读次数:
155
函数说明 1.LDA(n_topics, max_iters, random_state) 用于构建LDA主题模型,将文本分成不同的主题 参数说明:n_topics 表示分为多少个主题, max_iters表示最大的迭代次数, random_state 表示随机种子 2. LDA.component ...
分类:
其他好文 时间:
2019-01-27 01:06:51
阅读次数:
760
可以使用TikZ,用TikZ绘制出来的图形效果非常好,原生支持所有LaTeX语法。 使用 LaTeX 画柱状图/条形图参考:Guide to draw charts (basic, pie, bar) from data Example: Matrix multiplication : Exampl ...
分类:
其他好文 时间:
2019-01-26 17:08:36
阅读次数:
166
对角矩阵(diagonal matrix):只在主对角线上含有非零元素,其它位置都是零,对角线上的元素可以为0或其它值。形式上,矩阵D是对角矩阵,当且仅当对于所有的i≠j, Di,j= 0. 单位矩阵就是对角矩阵,对角元素全部是1。我们用diag(v)表示一个对角元素由向量v中元素给定的对角方阵。对 ...
分类:
编程语言 时间:
2019-01-25 15:17:57
阅读次数:
234
COURSE MANUALSecond Year Project IEBS2002Operations Research Assignment -- Solving SudokusAcademic Year 2018/2019 Contents1 Sudoku 32 Data structures ...
分类:
其他好文 时间:
2019-01-23 20:30:40
阅读次数:
136
We have a two dimensional matrix A where each value is 0 or 1. A move consists of choosing any row or column, and toggling each value in that row or c ...
分类:
其他好文 时间:
2019-01-22 20:41:09
阅读次数:
157
一道欧拉路径(回路)板子题。 注意“回路”那个词,那是第一个数据点。。。 没有特判没有找到起点的情况的话,这个点就没有分…… 一般用链前做,但是由于这道题要求字典序,所以只能用matrix(邻接矩阵)。 下面上邻接矩阵的代码: 下面是链前代码: 大同小异~ ...
分类:
其他好文 时间:
2019-01-22 19:48:57
阅读次数:
227