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

School of System and Technology: Department of Computer Science

This document is a midterm exam for a Data Structures and Algorithms course taken in the fall 2020 semester. It contains 4 questions worth a total of 15 marks. Question 1 asks students to write an algorithm to visit the nodes of a double linked list in reverse order. Question 2 asks students to write an expression in postfix form. Question 3 asks students to modify their student ID number and generate a binary search tree from the resulting series of numbers before traversing it in different forms. Question 4 asks students to replace digits in their student ID with letters and evaluate an expression with the substituted values.

Uploaded by

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

School of System and Technology: Department of Computer Science

This document is a midterm exam for a Data Structures and Algorithms course taken in the fall 2020 semester. It contains 4 questions worth a total of 15 marks. Question 1 asks students to write an algorithm to visit the nodes of a double linked list in reverse order. Question 2 asks students to write an expression in postfix form. Question 3 asks students to modify their student ID number and generate a binary search tree from the resulting series of numbers before traversing it in different forms. Question 4 asks students to replace digits in their student ID with letters and evaluate an expression with the substituted values.

Uploaded by

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

School of System and Technology

Department of Computer Science


Program: BS (CS/SE/IT)
Course Code: CC2411w Semester: Fall 2020
Course Title: Data Structures & Algorithm Examination: Mid Exam
Resource Person: Owais Hakeem Total Marks: 15
Date: DEC 07, 2020 Time: 01:00 hour

Student Name: ID: Section:V1

SECTION 01
Question 01 (03 Points)
Write an algorithm to visit the double linked list consisting of thirteen nodes in
reverse order
Question 02 (02 Points)
Write Expression in postfix form.
(b+a-(b+c*a+(c*d-a)+a)-c)
Question 03 (05 points)
Add last digit of your own id to all digits in your student id e.g. if your id is
F2018266123 then exclude F and 3+ (all digits in your id).
Now the series of numbers should be,
5 4 4 11 5 9 9 4 5 6
a) Generate a Binary search tree
b) Now traverse the tree in,
I. Infix form
II. Prefix form
III. Postfix form
Question 04 (05 points)
Consider your own Student ID, e.g. if your Id is F2018266123, then consider 3=a,
2=b, 1=c, 6=d, 6=e, 2=f, and 1=g mean assign alphabets in reverse order, now
replace the corresponding digits with the alphabets in the following expression and
evaluate.
Note: If you have 0 (zero) in your ID, Simply replace it with 9.

acb+-eaf/+*g↑b+

GOODLUCK

Page 1 of 1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy