Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Introduction to Linked List in Data Structure Computer Science

Rating
-
Sold
-
Pages
7
Uploaded on
05-06-2022
Written in
2019/2020

This document covers the linked list topic.

Institution
Course

Content preview

Linked List
Before the concept of linked list we should about arrays.
There are some limitations of arrays as a list.


Limitations of Arrays as Lists:


 We have seen implementation of a list by Array. It is a property of an array that
its elements are placed consecutively in memory.
 There may not be enough continuous memory locations to accommodate
entire Array. Even if there are more free memory locations scattered throughout
memory in the form of small free blocks.
 Once we declare size of Array, it is not possible to increase or decrease it during
the execution of the program. If we need more elements to store in the Array,
there is need of changing its size in the declaration.
 Usually, the number of items in any list is not known in advance in most cases.
 If Array is used to implement a List, it could result in wastage of memory, if the
entire array space is not consumed.
 In order to overcome these shortcomings of a Arrays as a List we need an
implementation of a List that
 would not require static list size and
 the memory is not reserved in the beginning. That is, the memory is
dynamically is assigned as the need arises.
 Furthermore, that would not require continuous large free memory block
to store list and will be able to use scattered smaller free memory blocks.
 Linked List implementation of a List is one such example.

, Linked List
 Linked List is an implementation of a list using linked memory.
 Linked List overcomes the limitations of Array based list implementation.
 A linked list is a dynamic data structure that grows and shrinks without any
limitation on size (except total memory space)
 Linked List is a linear collection of data elements.
 The Linear order is not implemented by continuous memory locations but
through pointers linking data elements.
– It is not necessary that next element to a node will be placed in a location
adjacent to it. It may be anywhere in the memory. We have to keep track of next
element’s (or node’s) location.
 Each data element in a Linked List is called a Node.
 To create a linked list, at first, we define structure of individual elements or the
node.  Each node is divided into two parts.
– Information Part
– Link Field or Next Pointer
 The Information part can again consist of many data items.
 The Next or Link pointer field holds the starting location of the next node.

Written for

Course

Document information

Uploaded on
June 5, 2022
Number of pages
7
Written in
2019/2020
Type
Class notes
Professor(s)
Seema
Contains
Bs, bsc, ms, msc, first year, second year, mcs

Subjects

$3.74
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Seema080

Also available in package deal

Get to know the seller

Seller avatar
Seema080 university
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 year
Number of followers
0
Documents
15
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions