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

Assignment # 02 DSA

The document is an assignment for the Data Structures and Algorithms course at the University of Sargodha, focusing on key concepts such as LIFO and FIFO data structures, their real-life applications, and their implementation in C++. It includes specific questions requiring explanations and C++ programming tasks related to priority queues and binary trees. The assignment is intended for 7th semester students and covers Course Learning Outcome 01.

Uploaded by

obaid ur rehman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment # 02 DSA

The document is an assignment for the Data Structures and Algorithms course at the University of Sargodha, focusing on key concepts such as LIFO and FIFO data structures, their real-life applications, and their implementation in C++. It includes specific questions requiring explanations and C++ programming tasks related to priority queues and binary trees. The assignment is intended for 7th semester students and covers Course Learning Outcome 01.

Uploaded by

obaid ur rehman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

University of Sargodha

College of Engineering and Technology


Department of Electrical Engineering

Subject: Data Structures and Algorithms (CE-415) Assignment No: 02


Title: Data Structures Semester: 7th
Teacher: Engr. Nauman Ahmad Tariq

Note:
- Answer the following questions.
- This assignment covers CLO: 01 of the course.

Q1
What are LIFO and FIFO data structures? Explain both LIFO and FIFO taking help of some
real-life examples along with their uses in computer programs.
Q2
What is the most effective way to implement a priority queue? Create a C++ program that
implements priority queues using the most effective method.
Q3

Q4
Write a C++ program that creates a binary tree T in memory. Write non-recursive C++
functions in that program for each of the following:
a) Finding the number of nodes in T.
b) Finding the depth D of T.
c) Finding the number of terminal nodes in T.
d) Deletes all the terminal nodes in T

You might also like