Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2b96f00

Browse files
feat(book/linkedlist): add applications
1 parent c1cf57a commit 2b96f00

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

‎book/content/part02/linked-list.asc

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,28 @@ endif::[]
99
[[linked-list]]
1010
=== Linked List
1111

12-
A list (or Linked List) is a linear data structure where each object has a pointer to the next one.
12+
A list (or Linked List) is a linear data structure where each object has a pointer to the next one creating a chain. You can also have a back reference to the previous node.
13+
14+
image::dllx4-compact.png[]
15+
16+
The data doesn't have to be a number. It can be anything that you need (e.g., images, songs, menu items).
17+
18+
.Some features powered by linked lists:
19+
- _Image viewer_ – The previous and next images are linked in an image viewer so that the user can navigate them.
20+
- _Previous and next page in web browser_ – We can access the previous and next URL searched in a web browser by pressing the back and next button since they are linked.
21+
- _Music Player_ - Queue of songs in a music player connects them so you can move to the next song or previous one.
22+
23+
.Other Applications:
24+
- Build <<Stack>> and <<Queue>> data structures, which are useful for Graph Traversal and other things.
25+
- Linked Lists are used on <<hashmap-chap>> to handle collisions.
26+
- Linked Lists can be used when representing a <<graph>> as an adjacency list.
27+
- Operate arbitrary big numbers (think hundreds of digits). Each digit is a node of a linked list.
28+
- Manipulation of polynomials by storing constants in the node of a linked list.
29+
- Representing sparse matrices (an array representation will waste a lot of memory when most of the cells are empty). The linked list will represent only the non-zero values saving significant space.
30+
31+
Hopefully, this will get you excited about learning Linked Lists since it's the base of many interesting applications. Let's learn more about the different types of linked lists.
32+
33+
==== Types of Linked List
1334

1435
.Linked Lists can be:
1536
- *Singly*: every item has a pointer to the next.

‎book/images/critical-path-examples.png

-2.79 KB
Loading[フレーム]

‎book/images/dllx4-compact.png

6.6 KB
Loading[フレーム]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /