[algogeeks] time complexity of algorithms

2006-12-15 Thread programming
Hi all, i have 3 short questions that i would like answered. 1) What is the best case complexity for a tree of degree(4). I said B(n) = n. Is it B(n)=1? I think it is the first case 2) Also, is the average case for a doubly circular queue A(n)=n+1/2 3) Lastly, is the worst-case of a search

[algogeeks] Re: time complexity of algorithms

2006-12-15 Thread Mayur
1.) If you're talking about search using a tree with each node having degree 4, then the best-case complexity is indeed O(1). Why, the first node (the root) could be the one that you're looking for. 3.) Yes indeed. Since, your tree doesn't seem to have any branching logic (like a BST does), the

[algogeeks] Re: time complexity of algorithms

2006-12-15 Thread programming
programming wrote: Thanks for the advice, i think i am right about the circular queue been a(n)=n+1/2, you agree? Is this also the average case for a tree of degree(4)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google