Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 A ( 2 1 Marks ) ( a ) Suppose you have been tasked with designing an algorithm that finds and stores all
Question A Marksa Suppose you have been tasked with designing an algorithm that finds and stores all the prime numbers between two arbitrary numbers, N and M where N M Required: i State the appropriate data structure you can use to store the prime numbers ii Justify your choice of data structure in i above b Consider the following words: Brenda, James, Aaron, Andrew, Mukai, Tatenda, Nyabiko, Ntsoaki, Axiel, Bobby Required: i Populate a BST using the words above. iiState with justification whether the tree you drew above is or is not a: a Complete binary tree b strictly binary tree c perfect binary tree iii Show the order of traversal of the tree using each of the following methods: a Preorder b Inorder c Postorder d Depthfirst search iv Calculate the maximum number of permissible nodes for this tree.
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