feat(pointer): 实现双向链表数据结构和基本操作 实现完整的双向链表功能,包括节点定义、链表结构体以及核心操作方法: - Append: 在链表末尾添加节点 - Length: 获取链表长度 - GetIndexNode: 根据索引获取节点 - GetAt: 根据索引获取值 - Insert: 在指定位置插入节点 - Remove: 删除指定位置节点 - Print: 打印链表内容 更新README文档,添加链表实现代码示例和说明,并优化drawio图表。 ```
40 lines
3.0 KiB
Plaintext
40 lines
3.0 KiB
Plaintext
<mxfile host="65bd71144e">
|
|
<diagram id="mRYyQN2MmenF_MetcyJE" name="第 1 页">
|
|
<mxGraphModel dx="1108" dy="581" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
|
<root>
|
|
<mxCell id="0"/>
|
|
<mxCell id="1" parent="0"/>
|
|
<mxCell id="11" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="8">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="2" value="Node<div>current</div>" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
<mxGeometry x="120" y="200" width="170" height="60" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="6" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="3" target="5" edge="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="3" value="Node<div><br></div>" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
<mxGeometry x="590" y="200" width="170" height="60" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="5" value="Node" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
<mxGeometry x="790" y="200" width="170" height="60" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="7" value="LinkList : 访问效果低,&nbsp; 修改成本低<div><br></div><div>slice: 访问效果高, 不支持修改</div>" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
|
<mxGeometry x="90" y="80" width="270" height="60" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="10" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="8" target="3">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="8" value="Node<div>new</div>" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
|
<mxGeometry x="370" y="330" width="170" height="60" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="9" value="" style="endArrow=classic;html=1;" edge="1" parent="1">
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
<mxPoint x="460" y="60" as="sourcePoint"/>
|
|
<mxPoint x="460" y="170" as="targetPoint"/>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile> |