SlideShare une entreprise Scribd logo
1  sur  21
Lecture - 1
on
Data Structures
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Data Type and Data Structure
Data type
•Set of possible values for variables
•Operations on those values
Ex : int, float, char ……….
Data Structure
A data structure is an arrangement of data in a computer's memory
or even disk storage.
The logical and mathematical model of a particular organization of
data is called a data structure.
A data structure is a particular way of storing and organizing data
in a computer so that it can be used efficiently.
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
An example of several common data structures:
• arrays,
•linked lists,
•stacks,
•queues,
• trees,
•and Graph
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Array
Linear array (One dimensional array) : A list of finite number n of similar data
elements referenced respectively by a set of n consecutive numbers, usually 1,
2, 3,…..n. That is a specific element is accessed by an index.
Let, Array name is A then the elements of A is : a1,a2….. an
Or by the bracket notation A[1], A[2], A[3],…………., A[n]
The number k in A[k] is called a subscript and A[k] is called a subscripted
variable.
element
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Example
A linear array STUDENT consisting of the name of six students
1
2
3
4
5
6
Dalia Rahaman
Sumona
Mubtasim Fuad
Anamul Haque
Ibtisam Rahaman
Jarin
STUDENT
Here, STUDENT[4] denote Anamul Haque
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Array (con…)
Linear arrays are called one dimensional arrays because each
element in such an array is referenced by one subscript.
(Two dimensional array) : Two dimensional array is a collection of
similar data elements where each element is referenced by two
subscripts.
Such arrays are called matrices in mathematics and tables in
business applications.
Multidimensional arrays are defined analogously
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
1
2
1 2 3 4
3
4
MATRICES
Here, MATRICES[3,3]=11
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Array Data Structure
It can hold multiple values of a single type.
Elements are referenced by the array name and an ordinal index.
Each element is a value
Indexing begins at zero.
The array forms a contiguous list in memory.
The name of the array holds the address of the first array element.
We specify the array size at compile time, often with a named constant.
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Linked lists
•A linked list, or one way list, is a linear collection of data
elements, called nodes, where the linear order is given by means
of pointers.
•Dynamically allocate space for each element as needed.
In linked list
Each node of the list contains the data item
a pointer to the next node
Collection structure has a pointer to the list Start
Initially NULL
NextData
Node
Start
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Linked lists
Start
Data Next
node
node
Data
Linked list with 2 nodes
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Linked lists
1
2
3
4
5
6
7
8
A
M
G
N
O
3 5
2
7
4
0
START START=3, INFO[3]=M
LINK[3]=2, INFO[2]=A
LINK[2]=5, INFO[5]=N
LINK[5]=4, INFO[4]=G
LINK[4]=7, INFO[7]=O
LINK[7]=0, NULL value, So the list has ended
INFO LINK
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Stacks
• Stacks are a special form of collection
with LIFO semantics
• Two methods
- add item to the top of the stack
- remove an item from the top of the stack
• Like a plate stacker
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Queues
• Like a stack, a queue is also a list. However,
with a queue, insertion is done at one end, while
deletion is performed at the other end
• The insertion end is called rear
– The deletion end is called front
InsertRemove
rearfront
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
edgesedges
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Data structure operations
The data appearing in our data structure is processed by means of certain
operations. In fact, the particular data structure that one chooses for a given
situation depends largely on the frequency with which specific operations are
performed. The following four operations play a major role:
Traversing
Accessing each record exactly once so that certain items in the record may
be processed. (This accessing or processing is sometimes called 'visiting"
the records.)
Searching
Finding the location of the record with a given key value, or finding the
locations of all records, which satisfy one or more conditions.
Inserting
Adding new records to the structure.
Deleting
Removing a record from the structure.
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
The following two operations, which are used in special situations, will also be
considered:
Sorting:
Arranging the records in some logical order
Merging:
Combining the records in two different sorted files into a single sorted files
Data structure operations (Continued)
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Algorithms
An essential aspect to data structures is algorithms. Data structures
are implemented using algorithms.
An Algorithm is a finite step – by – step list of well defined instructions
for solving a particular problem. It is used to manipulate the data
contained in the data structures as in searching and sorting. It states
explicitly how the data will be manipulated.
Perform data structure operations
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
Complexity
The complexity of an algorithm is a function describing the efficiency of the
algorithm in terms of the amount of data the algorithm must process. There
are two main complexity measures of the efficiency of an algorithm:
Time complexity is a function describing the amount of time an algorithm
takes in terms of the amount of input to the algorithm.
Space complexity is a function describing the amount of memory (space) an
algorithm takes in terms of the amount of input to the algorithm.
Prepared by, Jesmin Akhter,
Associate Professor, IIT,JU
•Once data is organized into forms such as trees, stacks and queues,
standard algorithms can be used to process them.
•Properly organized data lead to easy-to understand user interfaces
Discussion

Contenu connexe

Tendances

cs-project.doc
cs-project.doccs-project.doc
cs-project.doc
butest
 

Tendances (20)

external sorting
external sortingexternal sorting
external sorting
 
Data abstraction the walls
Data abstraction the wallsData abstraction the walls
Data abstraction the walls
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Data Structure Basics
Data Structure BasicsData Structure Basics
Data Structure Basics
 
1. Data structures introduction
1. Data structures introduction1. Data structures introduction
1. Data structures introduction
 
Introduction to data_structure
Introduction to data_structureIntroduction to data_structure
Introduction to data_structure
 
Lecture 01
Lecture 01Lecture 01
Lecture 01
 
Data Structures 7
Data Structures 7Data Structures 7
Data Structures 7
 
Binary Sort
Binary SortBinary Sort
Binary Sort
 
Data Structures 6
Data Structures 6Data Structures 6
Data Structures 6
 
Data structures and algorithm analysis in java
Data structures and algorithm analysis in javaData structures and algorithm analysis in java
Data structures and algorithm analysis in java
 
Data Structures & Algorithms
Data Structures & AlgorithmsData Structures & Algorithms
Data Structures & Algorithms
 
Data strucutre basic introduction
Data strucutre basic introductionData strucutre basic introduction
Data strucutre basic introduction
 
Datastructures using c++
Datastructures using c++Datastructures using c++
Datastructures using c++
 
data structures and its importance
 data structures and its importance  data structures and its importance
data structures and its importance
 
Introduction linked list
Introduction linked listIntroduction linked list
Introduction linked list
 
Study on Sorting Algorithm and Position Determining Sort
Study on Sorting Algorithm and Position Determining SortStudy on Sorting Algorithm and Position Determining Sort
Study on Sorting Algorithm and Position Determining Sort
 
cs-project.doc
cs-project.doccs-project.doc
cs-project.doc
 
Algorithm analysis in fundamentals of data structure
Algorithm analysis in fundamentals of data structureAlgorithm analysis in fundamentals of data structure
Algorithm analysis in fundamentals of data structure
 
Summer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & AlgorithmsSummer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & Algorithms
 

En vedette (11)

Usability study on SPOJ and Codechef
Usability study on SPOJ and CodechefUsability study on SPOJ and Codechef
Usability study on SPOJ and Codechef
 
Lec2
Lec2Lec2
Lec2
 
Algorithm & data structure lec2
Algorithm & data structure lec2Algorithm & data structure lec2
Algorithm & data structure lec2
 
Data structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 pptData structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 ppt
 
Lec1
Lec1Lec1
Lec1
 
Introduction of data structure
Introduction of data structureIntroduction of data structure
Introduction of data structure
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
DATA STRUCTURES
DATA STRUCTURESDATA STRUCTURES
DATA STRUCTURES
 
Fundamentals of data structures
Fundamentals of data structuresFundamentals of data structures
Fundamentals of data structures
 

Similaire à Ds it203-11-l01

Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1
Kumar
 
introduction about data structure_i.pptx
introduction about data structure_i.pptxintroduction about data structure_i.pptx
introduction about data structure_i.pptx
poonamsngr
 
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyDatastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Malikireddy Bramhananda Reddy
 
CHAPTER-1- Introduction to data structure.pptx
CHAPTER-1- Introduction to data structure.pptxCHAPTER-1- Introduction to data structure.pptx
CHAPTER-1- Introduction to data structure.pptx
OnkarModhave
 
Introduction to DS.pptx
Introduction to DS.pptxIntroduction to DS.pptx
Introduction to DS.pptx
OnkarModhave
 

Similaire à Ds it203-11-l01 (20)

Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1
 
Data structure unitfirst part1
Data structure unitfirst part1Data structure unitfirst part1
Data structure unitfirst part1
 
introduction about data structure_i.pptx
introduction about data structure_i.pptxintroduction about data structure_i.pptx
introduction about data structure_i.pptx
 
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyDatastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
 
CHAPTER-1- Introduction to data structure.pptx
CHAPTER-1- Introduction to data structure.pptxCHAPTER-1- Introduction to data structure.pptx
CHAPTER-1- Introduction to data structure.pptx
 
Data Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxData Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptx
 
Data structures - Introduction
Data structures - IntroductionData structures - Introduction
Data structures - Introduction
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
CSE 443 (1).pptx
CSE 443 (1).pptxCSE 443 (1).pptx
CSE 443 (1).pptx
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
 
Data structures in c#
Data structures in c#Data structures in c#
Data structures in c#
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresres
 
Introduction to DS.pptx
Introduction to DS.pptxIntroduction to DS.pptx
Introduction to DS.pptx
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Introduction to data structures (ss)
Introduction to data structures (ss)Introduction to data structures (ss)
Introduction to data structures (ss)
 
Data Structure # vpmp polytechnic
Data Structure # vpmp polytechnicData Structure # vpmp polytechnic
Data Structure # vpmp polytechnic
 

Plus de Chyon Ju (6)

Section break
Section breakSection break
Section break
 
Lecture 02
Lecture 02Lecture 02
Lecture 02
 
Lecture 07
Lecture 07Lecture 07
Lecture 07
 
Cellular communication
Cellular communicationCellular communication
Cellular communication
 
Pmit lecture 03_wlan_wireless_network_2016
Pmit lecture 03_wlan_wireless_network_2016Pmit lecture 03_wlan_wireless_network_2016
Pmit lecture 03_wlan_wireless_network_2016
 
02 gsm hscsd_gprs
02 gsm hscsd_gprs02 gsm hscsd_gprs
02 gsm hscsd_gprs
 

Dernier

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Dernier (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

Ds it203-11-l01

  • 1. Lecture - 1 on Data Structures Prepared by, Jesmin Akhter, Associate Professor, IIT,JU
  • 2. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Data Type and Data Structure Data type •Set of possible values for variables •Operations on those values Ex : int, float, char ………. Data Structure A data structure is an arrangement of data in a computer's memory or even disk storage. The logical and mathematical model of a particular organization of data is called a data structure. A data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.
  • 3. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU An example of several common data structures: • arrays, •linked lists, •stacks, •queues, • trees, •and Graph
  • 4. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU
  • 5. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Array Linear array (One dimensional array) : A list of finite number n of similar data elements referenced respectively by a set of n consecutive numbers, usually 1, 2, 3,…..n. That is a specific element is accessed by an index. Let, Array name is A then the elements of A is : a1,a2….. an Or by the bracket notation A[1], A[2], A[3],…………., A[n] The number k in A[k] is called a subscript and A[k] is called a subscripted variable. element
  • 6. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Example A linear array STUDENT consisting of the name of six students 1 2 3 4 5 6 Dalia Rahaman Sumona Mubtasim Fuad Anamul Haque Ibtisam Rahaman Jarin STUDENT Here, STUDENT[4] denote Anamul Haque
  • 7. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Array (con…) Linear arrays are called one dimensional arrays because each element in such an array is referenced by one subscript. (Two dimensional array) : Two dimensional array is a collection of similar data elements where each element is referenced by two subscripts. Such arrays are called matrices in mathematics and tables in business applications. Multidimensional arrays are defined analogously 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 1 2 3 4 3 4 MATRICES Here, MATRICES[3,3]=11
  • 8. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Array Data Structure It can hold multiple values of a single type. Elements are referenced by the array name and an ordinal index. Each element is a value Indexing begins at zero. The array forms a contiguous list in memory. The name of the array holds the address of the first array element. We specify the array size at compile time, often with a named constant.
  • 9. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Linked lists •A linked list, or one way list, is a linear collection of data elements, called nodes, where the linear order is given by means of pointers. •Dynamically allocate space for each element as needed. In linked list Each node of the list contains the data item a pointer to the next node Collection structure has a pointer to the list Start Initially NULL NextData Node Start
  • 10. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Linked lists Start Data Next node node Data Linked list with 2 nodes
  • 11. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Linked lists 1 2 3 4 5 6 7 8 A M G N O 3 5 2 7 4 0 START START=3, INFO[3]=M LINK[3]=2, INFO[2]=A LINK[2]=5, INFO[5]=N LINK[5]=4, INFO[4]=G LINK[4]=7, INFO[7]=O LINK[7]=0, NULL value, So the list has ended INFO LINK
  • 12. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Stacks • Stacks are a special form of collection with LIFO semantics • Two methods - add item to the top of the stack - remove an item from the top of the stack • Like a plate stacker
  • 13. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Queues • Like a stack, a queue is also a list. However, with a queue, insertion is done at one end, while deletion is performed at the other end • The insertion end is called rear – The deletion end is called front InsertRemove rearfront
  • 14. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU edgesedges
  • 15. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU
  • 16. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU
  • 17. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Data structure operations The data appearing in our data structure is processed by means of certain operations. In fact, the particular data structure that one chooses for a given situation depends largely on the frequency with which specific operations are performed. The following four operations play a major role: Traversing Accessing each record exactly once so that certain items in the record may be processed. (This accessing or processing is sometimes called 'visiting" the records.) Searching Finding the location of the record with a given key value, or finding the locations of all records, which satisfy one or more conditions. Inserting Adding new records to the structure. Deleting Removing a record from the structure.
  • 18. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU The following two operations, which are used in special situations, will also be considered: Sorting: Arranging the records in some logical order Merging: Combining the records in two different sorted files into a single sorted files Data structure operations (Continued)
  • 19. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Algorithms An essential aspect to data structures is algorithms. Data structures are implemented using algorithms. An Algorithm is a finite step – by – step list of well defined instructions for solving a particular problem. It is used to manipulate the data contained in the data structures as in searching and sorting. It states explicitly how the data will be manipulated. Perform data structure operations
  • 20. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU Complexity The complexity of an algorithm is a function describing the efficiency of the algorithm in terms of the amount of data the algorithm must process. There are two main complexity measures of the efficiency of an algorithm: Time complexity is a function describing the amount of time an algorithm takes in terms of the amount of input to the algorithm. Space complexity is a function describing the amount of memory (space) an algorithm takes in terms of the amount of input to the algorithm.
  • 21. Prepared by, Jesmin Akhter, Associate Professor, IIT,JU •Once data is organized into forms such as trees, stacks and queues, standard algorithms can be used to process them. •Properly organized data lead to easy-to understand user interfaces Discussion