[algogeeks] BST represented in array

2007-03-24 Thread vim
hi guys plz explain how to sort elements of BST represented using array in o(n) time --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegrou

[algogeeks] Re: traverse the tree layer by layer.

2007-03-24 Thread vim
On Mar 23, 8:17 am, "tuesday" <[EMAIL PROTECTED]> wrote: > u can use a queen in bfs traverse > > void visit(Node* r) > { > > } > > void BF_Traverse(Node* r) > { >queen q; >q.push(r); >while(!q.empty()) >{ > Node* t = *q.front(); > q.pop(); > visit(t)

[algogeeks] Re: count the 1 bits in integer

2007-03-22 Thread vim
how abt my code #include int count1bitsn(int n) { int count=0; while(n) { count+=n&1; n=n>>1; } return count; } int main() { int n; printf("Enter the value of n\n"); scanf("%d",&n);

[algogeeks] Re: count the 1 bits in integer

2007-03-22 Thread vim
how abt my code #include int count1bitsn(int n) { int count=0; while(n) { count+=n&1; n=n>>1; } } int main() { int n; printf("Enter the value of n\n"); scanf("%d",&n); printf("Answer

[algogeeks] dfs or bfs

2006-04-16 Thread vim
Hello guys Which is faster in finding a graph cyclic or not ? DFS OR BFS --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To un

[algogeeks] Re: selection sort

2006-03-05 Thread vim
Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For mor

[algogeeks] selection sort

2006-03-01 Thread vim
Is best worst and average case same for selection sort? Tell me whether the time complexity depends on the basic steps. plz plz plz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to