![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 78
Lewin671
深大最帅的人
展开
-
链表的建立、删除、插入
1.链表的创建:需要一个头指针、结点指针、尾指针即可。这里值得注意的是,创建的过程头指针是不能变的,而每次插入一个节点,尾指针都要后移一个节点(一开始把尾指针指向头指针),如创建含有n个结点的链表如下代码node *Create(){ int num,n; cin>>n;//创建n个结点的链表 node *head=NULL,*ps,*pEnd;//头指针、结点指针、尾指原创 2018-01-19 00:48:19 · 469 阅读 · 0 评论 -
Representatios of graph
Representatios of graphadjacency-list representation1. what is adjacency-list?图G=(V,E)的邻接表是一个包含|V|个list的Adj数组,每一个list对应一个顶点, 对于每一个u属于V,邻接表Adj[u]包含了所有edge(u,v)属于E的顶点v。也就是说, Adj[u]包含了所有和u相邻的...原创 2018-08-23 10:32:46 · 299 阅读 · 0 评论 -
the minimal spanning tree algorithm
Minimal spanning treeWhat is spanning tree?Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together. A single ...原创 2018-08-23 19:20:36 · 634 阅读 · 0 评论 -
hdu 4313 Matrix
MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3567 Accepted Submission(s): 1419Problem DescriptionMachines have once again at...原创 2018-08-24 19:03:35 · 177 阅读 · 0 评论 -
拟阵及其应用(带有oj例题讲解)
Matroidintroduction这篇文章主要是写拟阵及其应用。虽然拟阵的出现并不是因为贪心算法,但是它在贪心算法有着非常重要的地位。一些概念线性相关和线性无关: 在线性代数里,矢量空间的一组元素中,若没有矢量可用有限个其他矢量的线性组合所表示,则称为线性无关或线性独立 (linearly independent),反之称为线性相关(linearly depende...原创 2018-08-25 21:49:02 · 5241 阅读 · 1 评论 -
Stack application
Train Problem I HDU - 1022As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Statio...原创 2018-09-24 03:05:59 · 286 阅读 · 0 评论