![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
链表
zadarmo_
这个作者很懒,什么都没留下…
展开
-
单链表、树、图的存储(数组存储)
一、单链表1. 存储方式(不总结结构体存储)单链表的存储,主要是以下几个方面:存储每个点的值e[i]存储每个结点的下一个结点ne[i]存储头结点head用这3个变量去模拟链表。其中每个结点用数组下标去索引,即每个点对应一个下标。相应的,ne指针就指向下一个结点的下标,而非地址。/*** head : 指向 头结点的下标* e[i] : 下标为i的点的值* ne[i] : 下标为i的点 的 下一个结点的下标* idx : 结点个数。[0, idx)的每个数对应一个结点*/int原创 2020-09-28 14:01:02 · 1049 阅读 · 0 评论 -
1032 Sharing (25分)——甲级(链表、map映射)
Description:To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix....原创 2019-12-16 20:54:11 · 93 阅读 · 0 评论