I'm having problem with the complexity of this algorithm!

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Jul 2004
Posts: 6
Reputation: vienne is an unknown quantity at this point 
Solved Threads: 0
vienne vienne is offline Offline
Newbie Poster

I'm having problem with the complexity of this algorithm!

 
0
  #1
Oct 5th, 2004
I'm having problem with the complexity of this algorithm. Can you help me?
what is the usual theta function of this algorithm? and how can I solve them?

Algorithm Que (int array A[], int start, int end)
begin

if (start = = end) then return A[start]
else
	begin

int mid = (start+end)/2;

	if (A[start] < A[mid]}) then
		return Que (A, start, mid)
	else
		return Que (A, mid+1, start);

for i = start through end do
		for j = i through end do
			A[i] = A[j]-10;
	end;
end algorithm
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Computer Science Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC