944,017 Members | Top Members by Rank

Ad:
Oct 5th, 2004
0

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

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vienne is offline Offline
6 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: Auto timedate update
Next Thread in Computer Science Forum Timeline: I need graduation project better in wireless applications





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC