310 likes | 812 Views
DATA STRUCTURE. In-Service course for PGT Computer Science 2009. Presented by -. Group I Ms. Pankaj Choudhary PGT (Computer Sc.) Kendriya Vidyalaya, Sriganganagar Cantt. In-Service course for PGT Computer Science 2009. Contents -. Definition Classification of Data Structure
E N D
DATA STRUCTURE In-Service course for PGT Computer Science 2009
Presented by - Group I Ms. Pankaj Choudhary PGT (Computer Sc.) Kendriya Vidyalaya, Sriganganagar Cantt. In-Service course for PGT Computer Science 2009
Contents - Definition Classification of Data Structure Types of Data Structure Simple Data Structure Compound Data Structure Linear Data Structure Non-Linear Data Structure Operations on Data Structure In-Service course for PGT Computer Science 2009
Definition - A Data Structure is a named group of data of different data types which can be processed as a single unit. Data Structure is a logical or mathematical model of a particular organization of data and specify operation on it, it is called Data Structure. In-Service course for PGT Computer Science 2009
Classification of Data Structure - Logical Data Structure Logical Data Structure is the relationship among data elements in a Data Base. Physical Data Structure Physical Data Structure tells us how the data is actually physically stored. In-Service course for PGT Computer Science 2009
Types of Data Structure - In-Service course for PGT Computer Science 2009
Simple Data Structure - Definition :- These data structures are normally built from primitive data types like integer, real, characters and boolean. Eg. Arrays, Structure. In-Service course for PGT Computer Science 2009
Classification of Simple DS - Array – Arrays refer to a named list of a finite number n of similar data elements, referenced respectively by set of n consecutive numbers; usually 0,1,2,……,n-1. eg. A[0], A[1], A[2], …….., A[9] Where A is an array of size 10 Structure – Structure refers to a named collection of variables of different data types. Syntax: Struct struct_name { DataTypes(field1); Field2; : } struct_object; In-Service course for PGT Computer Science 2009
Compound Data Structure - Definition :- Simple data structures can be combined in various ways to form more complex structures called compound data structures. Eg. Stack, Queue, etc. In-Service course for PGT Computer Science 2009
Classification Of Compound DS - Linear Data Structure – In linear data structure processing of data items is in linear fashion ie; Data can be processed one by one sequentially. Eg. Stack, Queue, Linked List. Non-linear Data Structure – A data structure in which insertin & deletion is not possible in linear fashion is called non-linear data structure. These are multilevel data structures. Eg. Tree. In-Service course for PGT Computer Science 2009
Types Of Linear DS - a) Stack – The stack in an ordered collection of items into which items may be inserted or deleted at one end, known as to ‘TOP’ of the stack. Stack is also known as LIFO (Last In First Out) i.e. In a stack last inserted item will be the first to be deleted. TOP In-Service course for PGT Computer Science 2009
Queue – The queue is a linear list in which insertion can take place at one end, the ‘rear’ and deletion take place at the other end, the ‘front’ of the list. Queue is also known as FIFO(First In First Out). i.e. In a queue first inserted item will be the first to be deleted. front rear In-Service course for PGT Computer Science 2009
Linked List – A linked list can be defined as collection of nodes. A node has two fields : INFO that contains information and ADD field that contains the address of next node i.e. pointer to the next node. Linked list can be peresented as follows: INFO ADD In-Service course for PGT Computer Science 2009
Types Of Non Linear DS - a c b Tree – Data frequently contain a hierarchical relationship between various elements known as nodes. The data structure which reflects this relationship is called a tree. Top most node is called the root and bottom most nodes are called leaves of the tree. e f g d In-Service course for PGT Computer Science 2009
Operations On Data Structure - The basic operations performed on data structure are : 1. Insertion – means addition of a new data element in a data structure. 2. Deletion – means removal of a data element from a data structure. The data element is searched before its removal. Continue.. In-Service course for PGT Computer Science 2009
3. Searching – involves searching for a specified data element in a data structure. 4. Traversal – means processing of all the data elements of the data structure. 5. Sorting – means arranging the data elements in a specified order. 6. Merging – combining elements of two similar data structures to form a new data structure of same type. In-Service course for PGT Computer Science 2009
THANK YOU In-Service course for PGT Computer Science 2009