0% found this document useful (0 votes)
137 views

Types of Data Structure

The document discusses different types of data structures including primitive and non-primitive data structures. Primitive data structures like integers, floats, characters, and pointers are basic types that are directly operated on by machine instructions. Non-primitive data structures are more complex and are derived from primitive types, emphasizing structure and relationships between grouped data. Linear data structures like arrays, linked lists, stacks, and queues maintain a linear relationship between elements. Non-linear structures like trees and graphs have non-sequential relationships between elements. Examples and properties of various data structures are provided.

Uploaded by

namratagawale87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views

Types of Data Structure

The document discusses different types of data structures including primitive and non-primitive data structures. Primitive data structures like integers, floats, characters, and pointers are basic types that are directly operated on by machine instructions. Non-primitive data structures are more complex and are derived from primitive types, emphasizing structure and relationships between grouped data. Linear data structures like arrays, linked lists, stacks, and queues maintain a linear relationship between elements. Non-linear structures like trees and graphs have non-sequential relationships between elements. Examples and properties of various data structures are provided.

Uploaded by

namratagawale87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

 Primitive data Structure

 Primitive data Structure are basic data Structure and are directly operated on
machine instructions. e.g. integer, characters.
 Normally , primitive data Structure have different representation on different
computer.
 A primitive data type defines how the data will be internally representation in
stored and retrieved from the memory.
 Different types of primitive data Structure:-
1. integer
2. Float
3. Characters
4. Pointer

 Non - primitive data Structure

 The non primitive data Structure are highly developed complex data
Structure.
 non primitive Data Structure are derived from the primitive data structure.
 Non primitive Data Structure emphasize on structure in a group
homogeneous (same type) or heterogeneous (different types)data items.
 Different types of non primitive Data Structure:-
1. Linear data Structure
2. Non Linear data Structure
 Linear data Structure

 Linear Data Structure maintains a linear relationship between their data


element.
 Linear Data Structure is one in which its elements from a sequence.
 it means each elements is the structure has unique predecessor and a unique
successor.
 Types of linear Data Structure:-
1 Arrays
2 Linked list
3 Struck
4 Queuess

1)Array
 An array is the collection of homogeneous (similar types) data element.
 An array is declared by the following way in C language.
Int [10];
 Diagram:-
2)Linked list
 Linked list is the alternative approach of arrays .if we are not away of upper
limit of number of elements in advance than linked list is one of the options.
 In this organisation data can be placed Anywhere is memory and these data
are linked with each other using pointer field.
 This pointer field store the address of next element in the list.
 Diagram :-

3)Stack
 A stack is a data structure in which all the insertion and deletion are
performed at one end which is known as TOP of the stack.
 Stack follow LIFO (last in first out) mechanism. The real life example of stack
are plates on tray and stack of coins etc.
 Diagram:-
4)Queue
 Graphs in data structures are non A queue is a linear data structure in which
insertion and deletion are Performed at rear and front respectively.
 Queue follows FIFO (First in first out) mechanism.
 The operations that can be performed on a queue are Insertion (add an
element in the front end of a queue) and Deletion (Deleting an element from
the rear end of a queue
 Diagram:-
 Non Linear data Structur

 In non-linear data structures, data elements are not organized in a sequential


fashion.
 Each element in non linear data structure is not constrained to have a unique
predecessor and a unique successor.
 Types of non linear Data Structure :-
1.tree
2.graphs
1.tree
 Tree maintains a hierarchical structure on collection of data items.
 Tree data structures are completely different from the arrays, stacks, queues
and linked lists.
 . It stores the data on multiple levels. The top node of the Tree Data Structure
is known as the Root Node
 Diagram:-

2.Graph
 Graph is data Structure are non-linear data structures made up of a finite
number of nodes or vertices and the edges that connect them.
 Graphs in data structures are used to address real-world problems in which it
represents the problem area as a network like telephone networks, circuit
networks, and social networks.
Graph is collection of vertices (nodes) and edges (arcs) where each edge in it
is specified by a pair of vertices. ĵ
 Diagram

 Primitive data structure Types


1.Integer
 The integer data type contains the numeric values. It contains
the whole numbers that can be either negative or positive.
 When the range of integer data type is not large enough then
in that case, we can use long.

2.float
 The float is a data type that can hold decimal values.
 When the precision of decimal value increases then the Double data type is
used.
 Syntex :- variable_name=val;
 It can also assign multiple variables together by using a single float by
continuing them in the declaration statement.

3.character
 The CHAR data type stores character data in a fixed-length fieldData can be a
string of single-byte or multibyte letters, numbers, and other characters that
are supported by the code set of your database

 Pointer is a variable whose value is the address of another variable of the


same type.
4.Pointer
 The value of the variable that the pointer points to by dereferencing using
the * operator*.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy