0% found this document useful (0 votes)
2 views2 pages

DSA Assignment

The document outlines an assignment for the University of Karachi's Department of Software Engineering, focusing on data structures and their applications. It includes various questions requiring handwritten solutions, such as definitions, sorting algorithms, stack and queue operations, and expression evaluations. Group submissions are mandated, with specific instructions on formatting and penalties for late submissions.

Uploaded by

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

DSA Assignment

The document outlines an assignment for the University of Karachi's Department of Software Engineering, focusing on data structures and their applications. It includes various questions requiring handwritten solutions, such as definitions, sorting algorithms, stack and queue operations, and expression evaluations. Group submissions are mandated, with specific instructions on formatting and penalties for late submissions.

Uploaded by

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

University of Karachi

Department of Software Engineering


Data Structure & Applications
Assignment

Instructions:
 Solution must be Hand Written and submitted in form of Hardcopy otherwise not accepted.
 Assignment must be submitted in Group (4 max.). Each student has to solved his/her question and
write the roll number on that question.
 Late Submissions will not be acknowledged.

Q1) Define a data structure and explain its importance in software engineering with an example
from real-world applications.

Q2) How do linear and non-linear data structures differ? Illustrate your answer with real-life
scenarios for both.

Q3) Consider the following array

3 16 -1 0 8 7 1 55 -3 1

a. Sort the above array in ascending order using Selection Sort.


b. Search “16” using Binary Search.
c. Sort the above array in descending order using Bubble Sort.

Q4) Find where the elements of an array LA are stored, if the base address of LA is 320 & LB =
0. Assume that int(s) are stored in 4 bytes and double(s) in 8 bytes.

a. double LA[12]
b. double LA[3]
c. int LA[26]
d. int LA[2]

Q5) Consider a stack having memory cells N = 5. Initially the stack has Murree and
Lahore in it. Applies the following operations on the stack.
a. Push (Karachi, Islamabad and Faisalabad).
b. Pop ()
c. Push (Narran, Rawalpindi)
d. Pop ()

Q4) Construct the following Infix expressions into Postfix.


a. A $ B * C - D + E / F / (G + H)
b. Evaluate the postfix by taking A=2, B=3, C=1, D=4, E=4, F=2, G=1 and H=3

Q6) Consider a QUEUE having memory cells N = 5. Initially the queue is empty. Perform
the following operations and update the values of Front and Rear.

a. Red, Yellow and Brown are inserted


b. Red is deleted
c. Pink and Blue are inserted
d. Yellow and Brown are deleted
e. Black is inserted
f. Pink is deleted
g. Orange and Green are inserted
h. Blue is deleted
i. Yellow is deleted

Q7) Implement Binary Expression Tree for the following equation. Also traverse the tree by Pre-
Order, Post-Order and In-order manner.
((2 + 5) / 3) – (3 + 8)

Q8) Developed a tree from the following number by applying Binary Search Tree (BST)
technique. Show each step.

10,14,34,1,0,12 ,4,56,7,8

You might also like