Skip to content

Commit 3d3bd01

Browse files
committed
linked list image + blog introduction
1 parent 617b99f commit 3d3bd01

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

linked-list/images/linked-list.jpg

232 KB
Loading

linked-list/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Linked List DataStructure</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
</head>
7+
<body>
8+
<h1>Linked List DataStructure</h1>
9+
<h4>open dev tools and see the console</h4>
10+
<script src="js/index.js"></script>
11+
</body>
12+
</html>

linked-list/readme.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Linked List DataStructure #
2+
3+
In this section, we will be learning linked list datastructure.
4+
5+
![Queue Figure](https://raw.githubusercontent.com/mohanramphp/understanding-datastructures-in-javascript/master/linked-list/images/linked-list.jpg)
6+
7+
8+
> A linked list is a linear sequence of elements known as nodes.
9+
10+
Each node consists of two things they are
11+
1. data
12+
2. pointer
13+
14+
**_Data_** holds the data value of the node.
15+
**_Pointer_** holds the reference to the memory location of next/previous node.
16+
17+
Pointer concept is extremely important in many programming languages like C/C++
18+
> Pointers represent the address of a location in memory — in the other words, pointer is a variable that through it you can modify/read another variable.
19+
20+
In Linked List structure, Pointers are used as connections to hold pieces of the structure together. And therefore:
21+
22+
Linked List is the structure where all elements are arranged in linear order, which is determined by pointer stored in each element.
23+
24+
There are two types of linked list. They are,
25+
1. Singly Linked List
26+
* This is the simplest linked structure. Each of the element will keep a pointer to the next element — aka successor 
27+
* Here the list saves the pointer to the head element. 
28+
2. Doubly Linked List
29+
* Similar to singly, but in addition to a pointer to next element, each element also keeps a pointer to the previous element — aka predecessor — in the list
30+
* The list will saves pointers to both head and tail.
31+

0 commit comments

Comments
 (0)