Skip to content

Commit 5343453

Browse files
committed
docs: update description to lcci problem No.02.03
No.02.03.Delete Middle Node
1 parent 4c31939 commit 5343453

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

lcci/02.03.Delete Middle Node/README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@
55
## 题目描述
66

77
<!-- 这里写题目描述 -->
8-
<p>实现一种算法,删除单向链表中间的某个节点(除了第一个和最后一个节点,不一定是中间节点),假定你只能访问该节点。</p>
98

10-
<p>&nbsp;</p>
9+
<p>若链表中的某个节点,既不是链表头节点,也不是链表尾节点,则称其为该链表的「中间节点」。</p>
10+
11+
<p>假定已知链表的某一个中间节点,请实现一种算法,将该节点从链表中删除。</p>
12+
13+
<p>例如,传入节点 <code>c</code>(位于单向链表 <code>a->b->c->d->e->f</code> 中),将其删除后,剩余链表为 <code>a->b->d->e->f</code></p>
14+
15+
<p> </p>
1116

1217
<p><strong>示例:</strong></p>
1318

1419
<pre>
15-
<strong>输入:</strong>单向链表a->b->c->d->e->f中的节点c
16-
<strong>结果:</strong>不返回任何数据,但该链表变为a->b->d->e->f
20+
<strong>输入:</strong>节点 5 (位于单向链表 4->5->1->9 中)
21+
<strong>输出:</strong>不返回任何数据,从链表中删除传入的节点 5,使链表变为 4->1->9
1722
</pre>
1823

24+
<p> </p>
25+
1926
## 解法
2027

2128
<!-- 这里可写通用的实现逻辑 -->

0 commit comments

Comments
 (0)