Introduction to data structures and Linear Data structures

ammushruthi 4 views 8 slides Sep 16, 2025
Slide 1
Slide 1 of 8
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8

About This Presentation

Introduction to data structures and a brief introduction of linear data structures


Slide Content

Introduction to Data Structures Data is an entity piece of information Entity has attributes which will be assigned with values based on instruction Ex. Student is an entity, it has following attributes: Attributes – Values – Group of entity with similar properties forms an entity set. Student File Reg No Name DOB Course 101 Asha 6/5/1990 CSE Field 1 Field 2 Field 3 Field 4 Reg no Name DOB Course Record 1 101 Asha 1990 CSE Record 2 102 Bavya 1991 ISE Record 3 103 Chitra 1990 CSE

Records are further classified according to the lengths: Fixed length records Variable length records Definition of Data Structure : The organized collection of data with its operations is known as Data structure.

Primitive Data Structures  are the data structures consisting of the numbers and the characters that come  in-built  into programs. These data structures can be manipulated or operated directly by machine-level instructions. Basic data types like  Integer, Float, Character , and  Boolean  come under the Primitive Data Structures. Non-Primitive Data Structures  are those data structures derived from Primitive Data Structures. These data structures can't be manipulated or operated directly by machine-level instructions. The focus of these data structures is on forming a set of data elements that is either  homogeneous  (same data type) or  heterogeneous  (different data types). Based on the structure and arrangement of data, we can divide these data structures into two sub-categories - Linear Data Structures Non-Linear Data Structures

1. Linear Data Structures : Linear data structures are data structures in which, all the data elements are arranged in linear or sequential fashion. Examples of data structures include arrays, stacks, queues, linked lists. Arrays An array is a linear data structure and it is a collection of items stored at contiguous memory locations.   The idea is to store multiple items of the same type together in one place.  A[10] – Array A will have 10 elements with index starting from 0 to 9.

2) Stack: Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). LIFO implies that the element that is inserted last, comes out first and FILO implies that the element that is inserted first, comes out last.

3) Queues: A  Queue  is defined as a linear data structure that is open at both ends and the operations are performed in First In First Out (FIFO) order. The elements are inserted from one end called Rear end and elements are deleted from other end called front end.

4) Linked lists: The linked list is the linear data structure that contains the collection of nodes. A node consists of two things,   Data  Pointer to the next node.  In the linked list, each node is pointing to the other to maintain the sequence.  A linked List is used to utilize the space in memory. 

The  Head  pointer keeps track of the starting node of the linked list. T he  Tail  pointer point to the end of the linked list.  Why Linked List?
Tags