[algogeeks] Re: Complexity of euclidean theorem to find GCD

2011-08-03 Thread Dave
@Ankur: Maybe http://en.wikipedia.org/wiki/Euclidean_algorithm#Worst-case_number_of_steps will help. Dave On Aug 3, 10:55 pm, Ankur Khurana ankur.kkhur...@gmail.com wrote: Hi , can you tell me that how do we arrive at the complexity of the repetitive division theorem to find GCD. I tried to

Re: [algogeeks] Doubt

2011-08-03 Thread rajeev bharshetty
Since you are maintaining two different data structures ,one for the old tree and the other for new tree . I think this isn't considered in-place algorithm . The algorithm to be in-place should not use any additional data structures . Correct me if I am wrong . On Thu, Aug 4, 2011 at 2:52 AM,

[algogeeks] Re: Give an efficient search algo

2011-08-03 Thread amit karmakar
Can you show how to find k for an array containing n 2's using binary search. On Aug 4, 6:29 am, Dave dave_and_da...@juno.com wrote: @Amit: If k is not known, you can find it with another binary search. Dave On Aug 3, 3:02 pm, amit karmakar amit.codenam...@gmail.com wrote: I think for

Re: [algogeeks] Call by reference

2011-08-03 Thread Shashank Jain
@sandeep, i dint get what do you mean by simulate here, as in an example wud be gud. Shashank Jain Delhi College of Engineering On Wed, Aug 3, 2011 at 11:34 PM, Sandeep Jain sandeep6...@gmail.com wrote: I'd say C language is a truly call-by-value language. C++ supports call-by-reference.

Re: [algogeeks] Oracle Interview ..Need Help!!

2011-08-03 Thread Akanksha .
In our college they were also looking for the sound fundamentals of header files, libraries, macros etc. So be prepared with these also. On Thu, Aug 4, 2011 at 9:21 AM, umesh kewat umesh1...@gmail.com wrote: Better way of using DS, able to write good algo and programming puzzles Thanks

[algogeeks] pointer size

2011-08-03 Thread Shashank Jain
the size of a pointer is showing 4 bytes in my 64-bit OS, which should have been 8 bytes. Correct me where i am wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Call by reference

2011-08-03 Thread Tushar Bindal
Shashank, In C++ we implement it thru reference variables in the function call we can say func(x); in the definition we have, func(int a) whatever changes we make to a in func() are reflected back in x in the calling function In C, we can simulate i t through pointers call : func(x);

[algogeeks] friend function

2011-08-03 Thread Aashish
can friend function be overloaded ? if yes then plz clarify by giving an example... if no then why so. -- 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

Re: [algogeeks] Re: Minimum cuts required so that each sub string is a palindrome

2011-08-03 Thread ankit sambyal
thnks amit.. -- 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 more options, visit this

Re: [algogeeks] pointer size

2011-08-03 Thread Tushar Bindal
never assume that he compiler is same as the OS you run. it may be that you are running a 32-bit compiler I think pointers have size 4bytes on 8 byte compiler also - not sure. someone please correct me. On Thu, Aug 4, 2011 at 10:26 AM, Shashank Jain shashan...@gmail.com wrote: the size of a

Re: [algogeeks] Call by reference

2011-08-03 Thread Sandeep Jain
We can say call-by-reference is where changes in formal parameters are reflected in actual parameters. call-by-value is where changes in formal parameters are not reflected in actual parameters. However when u have something like int x=10; f(x); void f(int *p){ *p = 20;} changes in p(formal

Re: [algogeeks] Call by reference

2011-08-03 Thread Tushar Bindal
we know all these definitions. but i think the doubt was regarding the word simulate as we consider call by reference an internal part of C but your statement means that it is a concept of C++, but we just simulate it in C using pointers. Am I correctly interpreting it? On Thu, Aug 4, 2011 at

Re: [algogeeks] Call by reference

2011-08-03 Thread Tushar Bindal
that is exactly what i thought thanks for the clarification -- 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] Why this is giving run time error ?

2011-08-03 Thread TUSHAR
#includestdio.h main() { int j=4,i; goto L; for(i=0;ij;i++) { L: printf(%d,j); } } why this is giving infinite loop.Runtime error ? -- You received this message

Re: [algogeeks] pointer size

2011-08-03 Thread Shashank Jain
tush, u hv ny idea dev c uses which compiler? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering On Thu, Aug 4, 2011 at 10:38 AM, Tushar Bindal tushicom...@gmail.comwrote: never assume that he compiler is same as the OS you run. it may be that you are running a 32-bit

Re: [algogeeks] pointer size

2011-08-03 Thread Dipankar Patro
This has been a hot topic of discussion for a long time. But I found there are two things to look into it: 1. a 64 bit OS is one, which has 64 bit address handling capacity. and a 64bit processor is one which can perform operations on 64 bit data. A general concept that actually gets overlooked

Re: [algogeeks] pointer size

2011-08-03 Thread Shashank Jain
see dipankar, i hv 64 bit OS nd processor bt i dont know abt the compiler. nd yeah size of int is 4 bytes. so tell me where im interpreting wrong? Shashank Jain 3rd year, Computer Engg. Delhi College of Engineering On Thu, Aug 4, 2011 at 11:16 AM, Dipankar Patro dip10c...@gmail.com wrote:

Re: [algogeeks] Help on Recursion Bit Operators related problems

2011-08-03 Thread Shashank Jain
even this is a gud 1. http://www.cprogramming.com/tutorial/bitwise_operators.html Shashank Jain IIIrd year Computer Engineering Delhi College of Engineering On Thu, Aug 4, 2011 at 1:35 AM, Samba Ganapavarapu sambasiv...@gmail.comwrote: thanks raj, is this the bitwise operator tutorial that

<    1   2   3