Open Ex-monsters opened 1 year ago
https://ex-monsters.github.io/2023/06/26/%E5%B8%B8%E7%94%A8%E4%BB%A3%E7%A0%81%E6%A8%A1%E6%9D%BF2/
https://ex-monsters.github.io/2023/06/26/%E5%B8%B8%E7%94%A8%E4%BB%A3%E7%A0%81%E6%A8%A1%E6%9D%BF2/
常用代码模板 2—— 数据结构 # 单链表 123456789101112131415161718192021// head存储链表头,e[]存储节点的值,ne[]存储节点的next指针,idx表示当前用到了哪个节点int head, e[N], ne[N], idx;// 初始化void init(){ head = -1; idx = 0;}// 在链表头插