Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q 2 . ( a ) Model traffic control at a turning point using an appropriate data structure. Show using pseudocodes how will you implement
Qa Model traffic control at a turning point using an appropriate data structure. Show using
pseudocodes how will you implement entry and exit of traffic.
b Consider a string consisting of all the letters of your firstname and lastname. Ensure that the
string consists of a minimum of and a maximum of characters. You may append alphabets
by repeating from your firstname and lastname or truncate alphabets from your firstname and
lastname. Represent this string using a binary tree with the first character as the root. Your goal
should be to make this tree as complete as possible. Examine if your final tree is i almost
complete binary and ii heightbalanced.
c Show a problem where a graph representation of data can be beneficial. You should clearly
define the problem and the representation.Answer all questions
Qa Differentiate between a linear and a nonlinear data structure with one example in each
category.
b Define a strictly binary tree with an example. Prove using mathematical induction that a
strictly binary tree with leaves contains nodes.
c Define a linear linked list. How can you represent a node in a i a singly connected linear
linked list and ii a doubly connected linear linked list?
d Prove or disprove: A connected graph is always complete.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started