Question

2. Below is the program code for a function fnA.

Estimate the asymptotic running time of a call fnA (A,0,1,0,n) when A is an n x. n.square array. (a) Formulate a recurrence relation modelling the running time of this call as a function of n.[5 marks] (b) Use this recurrence relation to estimate the asymptotic running time of the call.[5 marks]

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6