Write a recurrence relation for your algorithm


Complete the following divide-and-conquer algorithm to determine if all integers in an array a are equal. The initial call would be allEqual(a,0,a.length-1). (Yes, there is an easy iterative algorithm for this problem. The goal here is to show me you can complete
this divide-and-conquer solution and analyze it).
boolean allEqual(int a[],int p,int r){
if (p == r)
return true;
if (A[p] != A[r])
return false;
Write a recurrence relation for your algorithm and then solve it to obtain the worst-case asymptotic time complexity for your algorithm. 

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Write a recurrence relation for your algorithm
Reference No:- TGS094632

Expected delivery within 24 Hours