@@ -4,26 +4,27 @@ _Read this in other languages:_
44[ _ Русский_ ] ( README.ru-RU.md ) ,
55[ _ 简体中文_ ] ( README.zh-CN.md ) ,
66[ _ 日本語_ ] ( README.ja-JP.md ) ,
7- [ _ Português_ ] ( README.pt-BR.md )
8- [ _ 한국어_ ] ( README.ko-KR.md )
9- 10- In computer science, a ** doubly linked list** is a linked data structure that
11- consists of a set of sequentially linked records called nodes. Each node contains
12- two fields, called links, that are references to the previous and to the next
13- node in the sequence of nodes. The beginning and ending nodes' previous and next
14- links, respectively, point to some kind of terminator, typically a sentinel
15- node or null, to facilitate the traversal of the list. If there is only one
16- sentinel node, then the list is circularly linked via the sentinel node. It can
17- be conceptualized as two singly linked lists formed from the same data items,
7+ [ _ Português_ ] ( README.pt-BR.md ) ,
8+ [ _ 한국어_ ] ( README.ko-KR.md ) ,
9+ [ _ Español_ ] ( README.es-ES.md ) ,
10+ 11+ In computer science, a ** doubly linked list** is a linked data structure that
12+ consists of a set of sequentially linked records called nodes. Each node contains
13+ two fields, called links, that are references to the previous and to the next
14+ node in the sequence of nodes. The beginning and ending nodes' previous and next
15+ links, respectively, point to some kind of terminator, typically a sentinel
16+ node or null, to facilitate the traversal of the list. If there is only one
17+ sentinel node, then the list is circularly linked via the sentinel node. It can
18+ be conceptualized as two singly linked lists formed from the same data items,
1819but in opposite sequential orders.
1920
2021![ Doubly Linked List] ( https://upload.wikimedia.org/wikipedia/commons/5/5e/Doubly-linked-list.svg )
2122
22- The two node links allow traversal of the list in either direction. While adding
23- or removing a node in a doubly linked list requires changing more links than the
24- same operations on a singly linked list, the operations are simpler and
25- potentially more efficient (for nodes other than first nodes) because there
26- is no need to keep track of the previous node during traversal or no need
23+ The two node links allow traversal of the list in either direction. While adding
24+ or removing a node in a doubly linked list requires changing more links than the
25+ same operations on a singly linked list, the operations are simpler and
26+ potentially more efficient (for nodes other than first nodes) because there
27+ is no need to keep track of the previous node during traversal or no need
2728to traverse the list to find the previous node, so that its link can be modified.
2829
2930## Pseudocode for Basic Operations
@@ -45,7 +46,7 @@ Add(value)
4546 end if
4647end Add
4748```
48-
49+ 4950### Delete
5051
5152``` text
@@ -82,7 +83,7 @@ Remove(head, value)
8283 return false
8384end Remove
8485```
85-
86+ 8687### Reverse Traversal
8788
8889``` text
@@ -96,7 +97,7 @@ ReverseTraversal(tail)
9697 end while
9798end Reverse Traversal
9899```
99-
100+ 100101## Complexities
101102
102103## Time Complexity
0 commit comments