Question: QUESTION 5 Describe recursion using pseudocode for a factorial algorithm as an example. In your answer be sure to explain what is meant by the
QUESTION 5
Describe recursion using pseudocode for a factorial algorithm as an example. In your answer be sure to explain what is meant by the base case and recursion step. Compare factorial using recursion to factorial using iteration. What are the advantages or disadvantages of each?
(13 marks)
Arrange the following Data Structure Activities in order of increasing values of O:
Perform linear search on an Array of size N
Perform Binary Search on an Array of size N
Sort and Array of size N using Quicksort
Sort and Array of size N using Selection Sort
Enqueue(x) in a circular queue with N elements
(5 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
