Re: [algogeeks] function overloading query

2011-11-21 Thread UTKARSH SRIVASTAV
http://www.ideone.com/JQFNh CHECK THE OUTPUT THERE IS NO AMBIGUITY BUT PLEASE EXPLAIN THE RESULTS On Sun, Nov 20, 2011 at 11:00 PM, Akash Coder akash.coder.g...@gmail.comwrote: it wont work even this wont function(char a[]) function (char *) coz the two forms are interchangeable On

[algogeeks] Re: Silly question

2011-11-21 Thread Mustafa
As already told by others try solving as many problems if possible try solving exercise of Alen Weiss, book, it will improve ur problem soving skills On Nov 20, 10:48 pm, Akash Coder akash.coder.g...@gmail.com wrote: yup... solve new varieties of problem... u will get used to it On Sun, Nov

Re: [algogeeks] function overloading query

2011-11-21 Thread atul anand
this is what i am getting after executing code meintion in the above link. (using gcc compiler ) temp.c:12: error: conflicting types for 'fun' temp.c:7: error: previous definition of 'fun' was here On Mon, Nov 21, 2011 at 3:09 PM, UTKARSH SRIVASTAV usrivastav...@gmail.comwrote:

Re: [algogeeks] Re: Silly question

2011-11-21 Thread atul anand
@Mustafa : are you talking about this book?? Data Structures and Algorithm Analysis in C++ http://www.amazon.com/Data-Structures-Algorithm-Analysis-2nd/dp/0201361221 On Mon, Nov 21, 2011 at 6:41 PM, Mustafa mustafa.fai...@gmail.com wrote: As already told by others try solving as many problems

Re: [algogeeks] LCA of a Binary tree not a binary search tree

2011-11-21 Thread Piyush Grover
For BST it would be rather simpler. find the first node which lies in between the two. On Wed, Nov 16, 2011 at 1:44 PM, anshu mishra anshumishra6...@gmail.comwrote: Node *LCA(node *root, node *e1, node *e2, int x) { Node *temp =NULL; Int y = 0;

Re: [algogeeks] Re: Silly question

2011-11-21 Thread shady
yes, btw, intent was to participate and practice. On Mon, Nov 21, 2011 at 10:14 PM, atul anand atul.87fri...@gmail.comwrote: @Mustafa : are you talking about this book?? Data Structures and Algorithm Analysis in C++ http://www.amazon.com/Data-Structures-Algorithm-Analysis-2nd/dp/0201361221

Re: [algogeeks] Linked List Problem-Suggest Algo

2011-11-21 Thread Piyush Grover
As you mentioned, the numbers designating the gaps can only be repeated so in your example 2 20 can be broken into 19 1 but 19 is already there in the list (the first couplet) and it's not the one which describes the gap. can you please clarify? On Mon, Nov 21, 2011 at 5:23 AM, Ankur Garg

[algogeeks] Re: K-way merging...

2011-11-21 Thread DarkPrince
In K way Merging , we implement Heap sort . You can go through the link http://www.site.uottawa.ca/~nat/Courses/DFS-Course/DFS-Lecture-9/tsld021.htm Tournament tree also uses Heap . For it's implementation we need sorted set of arrays and need to precalcuate the height of the tournament tree .

Re: [algogeeks] Re: Time Complexity

2011-11-21 Thread atul anand
@Gene : i guess you are considering balanced tree. what if the tree is left skewed or right skewed . then height of thee will ne H=No. of node. so we will get :- 1+2+3+4H so recurrence will be T(n) = T(n-1) + O(n) hence complexity will be O(N^2) correct me if i am missing somthing.

[algogeeks] Query: Function returning void pointer

2011-11-21 Thread Aniket
Can a function return a void pointer ? -- 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 algogeeks+unsubscr...@googlegroups.com. For

Re: [algogeeks] Query: Function returning void pointer

2011-11-21 Thread Prem Krishna Chettri
Ofcrse yes... hvnt you use Malloc ?? On Tue, Nov 22, 2011 at 1:23 PM, Aniket aniket...@gmail.com wrote: Can a function return a void pointer ? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Re: Soritng

2011-11-21 Thread kumar raja
@Dave: let us leave about Radix sort ,for it there are specific constraints on the numbers. @Amol sharma: i dont know what is cycle sort? Convey your answer in well known sorting methods. Ankur garg:In the phase of merging it compares the sorted sub arrays to merge them .So it is not correct..

Re: [algogeeks] Query: Function returning void pointer

2011-11-21 Thread Anika Jain
yes.. On Tue, Nov 22, 2011 at 1:23 PM, Aniket aniket...@gmail.com wrote: Can a function return a void pointer ? -- 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