Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
