原文:经典算法题每日演练——第二十一题 十字链表 上一篇我们看了矩阵的顺序存储,这篇我们再看看一种链式存储方法“十字链表”,当然目的都是一样,压缩空间。
一:概念 既然要用链表节点来模拟矩阵中的非零元素,肯定需要如下5个元素(row,col,val,down,right),其中:
row:矩阵中的行...
分类:
编程语言 时间:
2015-01-16 12:47:42
阅读次数:
291
题目: 采用递归计算过程计算出帕斯卡三角形的各个元素。row:0 11 1 12 1 2 13 1 3 3 14 1 4 6 4 15 . . . . . .col: 0 1 2 3 4//c++//递归#includeusing namespace std;int pascaler(int row...
分类:
编程语言 时间:
2015-01-14 14:10:10
阅读次数:
177
DISTINCT(COL)用来对结果去除重复
比如表内容如下:
SELECT DISTINCT(id)
FROM yww_test
下面的例子实现:选择过去一天,没有出现过的数据
-- 统计最原始的未上线采集数据,准备和其他表合并
DROP VIEW if EXISTS `unconnected_elemeterhead`;
CREATE VIEW unconnec...
分类:
数据库 时间:
2015-01-13 17:41:56
阅读次数:
154
首先,我们创建一个云服务项目,用来演示我们的blob存储下来我们修改我们我们云服务的名字我们需要添加一个空的WebForm的项目点击完成,我们可以看到我们的解决方案已经添加完成下来我们需要添加一个实体类,用来存储文件的信息.下面是我们实体类的using System;using System.Col...
比较二维数组列最小值,组成一个新数组返回。
实现核心算法,不需要使用IO
输入:{{5,6,1,16},{7,3,9}}
输出:{1,3}
import java.util.Arrays;
public class Col {
public static int[] getColMin(int a[][]) {
int[] res = new int[a.leng...
分类:
编程语言 时间:
2015-01-11 14:56:23
阅读次数:
193
select distinct col_namefrom tablewhere a=Xand b=Yand date(time)='xx-xx-xx';执行时间27.9772 秒explainselectdistinct col_namefrom tablewhere a=Xandb=Yanddat...
分类:
数据库 时间:
2015-01-09 22:13:55
阅读次数:
266
import random
#warning: x and y confusing
sx = 10
sy = 10
dfs = [[0 for col in range(sx)] for row in range(sy)]
maze = [[' ' for col in range(2*sx+1)] for row in range(2*sy+1)]
#1:up 2:down 3:left 4...
分类:
编程语言 时间:
2015-01-08 15:24:22
阅读次数:
158
1.opacity:0.5;(半透明效果在ie9及以上版本适用,ie8及以下不兼容)解决办法:在css中加入filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);即可eg: .fb_xl li{ font-size:16px; col...
分类:
Web程序 时间:
2015-01-07 12:28:20
阅读次数:
185
本文以1950年到2010年期间我国的火灾统计数据为例,数据如下所示:(0)加载数据data plot(x,y,type="o",xlab="年份",ylab="",ylim=c(0,maxy),col="red",main="1950年到2010年火灾年度统计",pch=c(15)) #画火灾数曲...
分类:
编程语言 时间:
2015-01-06 23:03:24
阅读次数:
347
#include #include #include #include #include #include using namespace std;const int MaxN = 100000 + 5;int n, m, Index;int A[MaxN], Pos[MaxN], Col[MaxN...
分类:
其他好文 时间:
2014-12-31 18:00:39
阅读次数:
143