Class 12 Stacks Queues and Linked List Revision Notes

Read and download free pdf of Class 12 Stacks Queues and Linked List Revision Notes. Students and teachers of Class 12 Computer Science can get free advanced study material, revision notes, sure shot questions and answers for Class 12 Computer Science prepared as per the latest syllabus and examination guidelines in your school. Standard 12 students should download this study material which will give them more knowledge for all chapters in Computer Science and all important topics which are scoring and can get you more marks. Students should also download free pdf of Chapter wise Notes for Class 12 Computer Science prepared by school teachers as per the latest NCERT, CBSE, KVS books and syllabus issued this year and also download free worksheets and question papers available here to get higher scores in school exams and tests, also click here for more Study Material for Class 12 Computer Science

Stack

In computer science, a stack is a Last in, First out (LIFO) data structure. It simply means that an element that is inserted at the end will be deleted first. To Manage a stack all the insertion and deletion takes place from one position called “top”.
One of the common uses of stack is in function call.
 
♦ Operations on the Stack

There are two fundamental operations
Push
Pop
Push means to insert an element
Pop means to delete an element
 
Queue

In computer science, a Queue is a First in, First out (FIFO) data structure. It simply means that an element that is inserted at the beginning will be deleted first. To Manage a queue all the insertion and deletion takes place from two different positions called “front” and “rear”.
Every element is inserted from the rear position and deleted from the front position in the queue.
 
Linked List

A linked list is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of a data and a reference (in other words, a link) to the next node in the sequence; more complex variants add additional links. This structure allows for efficient insertion or removal of elements from any position in the sequence.
 
Here in the figure is an example of a linked list whose nodes contain two fields: an integer value and a link to the next node. The last node is linked to a terminator used to signify the end of the list. Linked lists are among the simplest and most common data structures. They can be used to implement several other common abstract data types, stacks, queues etc though it is not uncommon to implement the other data structures directly without using a list as the basis of implementation.
The principal benefit of a linked list over an array is that the list elements can easily be inserted or removed without reallocation or reorganization of the entire structure because the data items need not be stored contiguously in memory or on disk. Linked lists allow insertion and removal of nodes at any point in the list, and can do so with a constant number of operations if the link previous to the link being added or removed is maintained during list traversal.
Linked list are dynamic structure where memory allocation takes place at run time.
 
♦ Operation on a linked list

There are three basic operations on a linked list
Insertion
Deletion
Traversal
 
Inserting a node or element into Linked list :
Inserting an element into linked list contains 3 types .
1. Insertion at beginning of the Linked list
2. Insertion after/before any element of the linked list
3. Insertion at the end of the linked list
 
♦ Deleting a node from the Linked list

A node can be deleted in 3 ways similar to Insertion.
1. Deleting a Node from the beginning of the Linked List
2. Deleting a node before/after an element from the Linked list.
3. Deleting a node from the end of the Linked List .
 

Tags: 

 


Click to View or Download pdf file
Click for more Computer Science Study Material

Latest NCERT & CBSE News

Read the latest news and announcements from NCERT and CBSE below. Important updates relating to your studies which will help you to keep yourself updated with latest happenings in school level education. Keep yourself updated with all latest news and also read articles from teachers which will help you to improve your studies, increase motivation level and promote faster learning

All India Children Educational Audio Video Festival

The Central Institute of Educational Technology (CIET), a constituent unit of National Council of Educational Research and Training (NCERT), is inviting entries for the 26th All India Children’s Educational Audio Video Festival (AICEAVF). This festival showcases the...

CBSE Reading Challenge

The acquisition of 21st century competencies of communication, critical and creative thinking and the ability to locate, understand and reflect on various kinds of information has become more crucial for our learners. It is well accepted that Reading Literacy is not...

MCQ Question based CBSE examination

For 2021-22 CBSE has launched MCQ question-based examination for Term 1 & Term 2 board examinations. The entire syllabus has been divided into two parts each including 50% of the entire syllabus. To score well, students must practice as per the new CBSE term-wise...

Board Exams Date Sheet Class 10 and Class 12

Datesheet for CBSE Board Exams Class 10  (Scroll down for Class 12 Datesheet) Datesheet for CBSE Board Exams Class 12

CBSE Science Challenge 2021 22

Science is inexplicably linked with our lives and helps us to understand the world around us better. Scientific and technological developments contribute to progress and help improve our standards of living. By engaging with this subject, students learn to think, solve...

National Youth Day and Birth Anniversary of Swami Vivekananda

Ministry of Education, Govt. of India vide D.O No. 12-4/2021-IS.4 dated 04.01.2022 intimated that 12 January 2022 will be celebrated as “National Youth Day” and “Birth Anniversary of Swami Vivekananda”.   All Schools affiliated to CBSE may celebrate 12 January 2022 as...