Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Data structure (easy notes)

Rating
-
Sold
-
Pages
24
Uploaded on
30-01-2025
Written in
2024/2025

Code -Bcs304,sub-data structure These are cls notes, notes are easy to study,

Institution
Course

Content preview

DATA STRUCTURE AND APPLICATIONS
MODULE I

1. Define data structure. Explain various operations on data structure (6)
2. Define data structure. Explain the classification of data structure with examples (6)
3. What is structure? Explain the different types of structure with example and give
difference between union and structure (10)
4. List and explain the functions supported in C for dynamic memory allocation (7)
5. Write a c program to demonstrate the basic operations on arrays (8)
6. Explain any four string handling functions supported by c with syntax and example(6)
7. What is Sparse matrix? Write the ADT of Sparse matrix. Give the triplet form of a given
matrix and also find its transpose.(8)

7 0 0 0 0
0 0 9 0 0
3 0 2 0 0
0 0 0 0 5

8. Define Pointers. How to declare and initialize pointers, explain with example(5)
9. Define stack. List and explain the various operations on stacks using arrays with stack
overflow and stack underflow conditions (10)
10. Write a c program to perform push(), pop(), display operations on STACK (10)
11. Develop a C recursive program for Tower of Hanoi problem. Trace it for 3 disks with
schematic call tree diagram (8)
12. Write an algorithm to convert an infix expression to postfix expression and also trace the
same for the expression (a+b)*d+e/f+c
13. Write an algorithm to evaluate postfix expression and apply the same for the given
postfix expression. ABC-D*+E$F+ and assume A=6 B=3 C=2 D=5 E=1 F=7
14. Convert the following infix expression into postfix expression using stack (5)
A + (B*C-(D/E^F)*G)*H

, 1. Define data structure. Explain various operations on data structure (6)

Definition
“Data structure is defined as the way of storing and organizing data elements by referring its
relationship to each other for efficient usage”

OPERATIONS ON DATA STRUCTURES
The data stored in the data structure can be processed by certain operations.
There are Five basic Operations:
1. Create
 To create a new data structure and allocate memory
2. Insert
 To add a new node into the data structure
 Ex: to add the details of a new student who has recently joined
3. Delete
 To remove an existing node from the data structure
 Ex: to delete the name of a student who has left the course
4. Traverse
 To access each node exactly once so that the nodes of a data structure can be
processed
 Also called as visiting
 Ex: to print the names of all the students in a class
5. Search
 To find the location of a node for a given key value
 The key data may or may not be present in the data structure
 Ex: to find the names of all the students who secured 100 marks in mathematics
Other Operations
1. Sorting
 arranging the data in a particular order i.e Ascending or Descending Order
 Ex: arranging the names of students in a class in an alphabetical order
2. Merging
 two sorted data items can be combined to form a single list of sorted data items.
 Joining two lists

2. Define data structure. Explain the classification of data structure with examples (6)

Definition
“Data structure is defined as the way of storing and organizing data elements by referring its
relationship to each other for efficient usage”
Classification Of Data Structures

, Data structures are generally categorized into two classes:
 Primitive data structures
 Non-primitive data structures
Primitive data structure
 The basic data types supported by all programming languages are called Primitive Data
Structure.
 These data structures are directly operated upon by machine level instructions
 Used to represent single values
 Example: integer, float, double, character, String and Boolean.
Non-primitive data structure
 The data structures which are derived by primitive data structures are called Non-
Primitive Data structures.
 It is used to store group of values
 Example: Arrays, Structure, Union, linked lists, stacks, Queue, trees, and graphs.
 Non-primitive data structures can further be classified into two categories:
o Linear data structure
o Non-linear data structure
Linear data structure
 If the elements of a data structure are stored in a linear or sequential order, then it is a
linear data structure.
 It establishes the adjacency relationship between the elements
 Two different Representations
o Sequential Memory Representation
Represents linear relationship between elements by means of sequential
memory locations
Example: Arrays, Queue, Stack
o Linked or Pointer Representation

Written for

Institution
Course

Document information

Uploaded on
January 30, 2025
Number of pages
24
Written in
2024/2025
Type
Class notes
Professor(s)
Santosh
Contains
Data structure

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
supriyadhonedhone

Also available in package deal

Get to know the seller

Seller avatar
supriyadhonedhone Guru nanak dev engineering College,bidar
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions