Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
259 views

Data Structures Notes

The document discusses data structures and their importance in programming and problem solving. It defines data structures as how data is organized and stored for efficient use. Some key points made are: - Data structures allow choosing the best way to represent data to solve problems efficiently based on time and space complexity. - Common data structures include arrays, linked lists, stacks, queues, trees and graphs. - Linear structures like arrays and linked lists have sequential access while non-linear structures like trees and graphs have random access. - Choosing the right data structure is important for algorithm design and influences how efficiently a problem can be solved.

Uploaded by

Alagu
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
259 views

Data Structures Notes

The document discusses data structures and their importance in programming and problem solving. It defines data structures as how data is organized and stored for efficient use. Some key points made are: - Data structures allow choosing the best way to represent data to solve problems efficiently based on time and space complexity. - Common data structures include arrays, linked lists, stacks, queues, trees and graphs. - Linear structures like arrays and linked lists have sequential access while non-linear structures like trees and graphs have random access. - Choosing the right data structure is important for algorithm design and influences how efficiently a problem can be solved.

Uploaded by

Alagu
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Data Structures

Dr. R. Gowri
Assistant Professor
Department of Computer Applications
Sona College of Arts and Science
Salem
Data Structure
 Data Structure is a way to store and organize data

so that it can be used efficiently


 A fundamental concept of any programming

language, and for algorithmic design


 How data and the relationship amongst different

data is represented
Ques:
What is Data Structure?
Why Data Struture?
Uses of Data Structure

knowledge of different kinds of data structures helps the


programmer in choosing which data structure suits the
best for solving a problem efficiently.

A problem is constrained by the space and time complexity


within which it has to be solved efficiently

Ques:
What is the necessity of Data Structure?
How Data Struture helps in solving a problem?
Algorithms
Algorithm is a finite set of well-defined procedure for solving a problem

An algorithm is a step by step recipe for solving an instance of a problem.

An algorithm is a precise procedure for solving a problem in finite


number of steps.

Problem Solving
Problem solving is a logical process of breaking down the problem into
smaller parts, each of which can be solved step by step to obtain the final
solution.

Ques:
What is an algorithm?
What is the use of algorithm?
Algorithm Properties
 It must be correct.
 It must be composed of a series of concrete steps.
 There can be no ambiguity as to which step will be performed next.
 It must be composed of a finite number of steps.
 It must terminate.
 It should be efficient and flexible
 It should use less memory space as much as possible
 Number of inputs: zero or more
 Number of outputs: one or more
Computer Program

A Good Program is a combination of both algorithm and a data structure

 An algorithm is a step by step recipe for solving an instance of a

problem

 A data structure represents the logical relationship that exists between

individual elements of data to carry out certain tasks

◦ A data structure defines a way of organizing all data items that consider not

only the elements stored but also stores the relationship between the

elements
Ques:
What do you mean by a program?
How a program is designed?
Applications of Data Structure
 Artificial intelligence
 Compiler design
 Machine learning
 Database design and management
 Blockchain
 Numerical and Statistical analysis
 Operating system development
 Image & Speech Processing
 Cryptography

Ques:
List some applications of Data Structure?
What is the Scope of Data Struture?
Data Structure Classification

Ques:
How Data Structure classified?
What are the types of Data Struture?
List some data structures.
Primitive Data Structure
The basic data structures that directly operate upon
the machine instructions

 They have different representations on different


computers.
 Integers , Floating point numbers , Character
constants , String constants and Pointers come under
this category

Ques:
What is Primitive Data
Structure?
Non-Primitive Data Structure
Non-primitive data structure is a type of data
structure that can store the data of more than one
type.

 It is for arranging the collection of homogenous data.


 Examples : Array, Linked list, stack, queue, tree, sets,
graph, …
 It is further classified as follows:
◦ Linear Data structure
◦ Non- Linear Data Structure

Ques:
What is Non-primitive Data Structure?
Why it is called as non-primitive Data Struture?
What are the types of non-primitive data structure?
Linear vs Non-linear Data Structure
Operations of Linear Data Structure

Ques:
What are the operations of Linear Data
Structure?
Array Data Structure
Properties of Array
Array Types
Example
Linked List
Linked List Types
Array Vs Linked List
Array Vs Linked List
Stack
Stack Implementation
Applications of Stack
Queue
Queue Operations
Applications of Queue
Queue types
Tree Data Structure
Tree Data Structure
Properties of Tree
Binary Tree Traversal
Binary Tree Traversal
Binary Tree Traversal
Graph
 A graph is defined as G = (V, E), where V is the set of vertices
(nodes) and E is the set of edges (arcs) connecting the vertices.
 An edge is represented as a pair (u, v).

Types of Graphs
1. Directed graph
2. Undirected graph

Undirected Graph
 In an undirected graph, the pair of vertices representing any
edge is unordered.
 Thus, the pairs (v1, v2) and (v2, v1) represents the same edge.
Graph Terminologies

You might also like