Re: [algogeeks] Re: Copy Constructor and reference
Hi, This is an extract from Thinking in C++, by Bruce Eckels. chapter 11. Basically he explains that when ever we call a function with some parameters, First these parameters are copied into stack before the function is called. For built in types compiler knows how many bytes to copy. But for data types created by us like structs or classes, it does not know the size. Further he explains why we use reference in copy constructor with reason behind it being reentrancy, which I have not understood. Can you please explain how reentrant functions has got to do with references? The extract from the book is given below for your reference. It does not take much time to read. Please throw some light on this. -Thanks in advance Mallesh Passing & returning by value To understand the need for the copy-constructor, consider the way C handles passing and returning variables by value during function calls. If you declare a function and make a function call, int f(int x, char c); int g = f(a, b); how does the compiler know how to pass and return those variables? It just knows! The range of the types it must deal with is so small – *char*, *int*, *float*, and *double *and their variations – that this information is built into the compiler. If you figure out how to generate assembly code with your compiler and determine the statements generated by the function call to *f( )*, you’ll get the equivalent of, push b push a call f() add sp,4 mov g, register a This code has been cleaned up significantly to make it generic – the expressions for *b *and *a * will be different depending on whether the variables are global (in which case they will be *_b * and *_a*) or local (the compiler will index them off the stack pointer). This is also true for the expression for *g*. The appearance of the call to *f( ) *will depend on your name-mangling scheme, and “register a” depends on how the CPU registers are named within your assembler. The logic behind the code, however, will remain the same. In C and C++, arguments are pushed on the stack from right to left, the function call is made, then the calling code is responsible for cleaning the arguments off the stack (which accounts for the *add sp,4*). But notice that to pass the arguments by value, the compiler simply pushes copies on the stack – it knows how big they are and that pushing those arguments makes accurate copies of them. The return value of *f( ) *is placed in a register. Again, the compiler knows everything there is to know about the return value type because it’s built into the language, so the compiler can return it by placing it in a register. The simple act of copying the bits of the value is equivalent to copying the object. Passing & returning large objects But now consider user-defined types. If you create a class and you want to pass an object of that class by value, how is the compiler supposed to know what to do? This is no longer a built-in type the compiler writer knows about; it’s a type someone has created since then. To investigate this, you can start with a simple structure that is clearly too large to return in registers: //: C11:PassStruct.cpp // Passing a big structure struct Big { char buf[100]; int i; long d; } B, B2; Big bigfun(Big b) { b.i = 100; // Do something to the argument return b; * Chapter 9: References & the Copy-Constructor 313 * } int main() { B2 = bigfun(B); } ///:~ Decoding the assembly output is a little more complicated here because most compilers use “helper” functions rather than putting all functionality inline. In *main( ) *, the call to *bigfun( ) * starts as you might guess – the entire contents of *B *is pushed on the stack. (Here, you might see some compilers load registers with the address of *B *and its size, then call a helper function to push it onto the stack.) In the previous example, pushing the arguments onto the stack was all that was required before making the function call. In *PassStruct.cpp*, however, you’ll see an additional action: The address of *B2 *is pushed before making the call, even though it’s obviously not an argument. To comprehend what’s going on here, you need to understand the constraints on the compiler when it’s making a function call. Function-call stack frame When the compiler generates code for a function call, it first pushes all the arguments on the stack, then makes the call. Inside the function itself, code is generated to move the stack pointer down even further to provide storage for the function’s local variables. (“Down” is relative here; your machine may increment or decrement the stack pointer during a push.) But during the assembly-language CALL, the CPU pushes the address in the program code where the function call *came from*, so the assembly-language RETURN can use that address to return to the calling point. This address is of course sacred, because without it your program will get completely lost. Here
Re: [algogeeks] Re: Adobe Strings matching Puzzle.
Hi Anuragh, Your stack method does not seem to work. The first element popped out of stack A will be p. But the first character in B is t. It does not match in the first step itself. -Regards, Mallesh On Wed, Jul 21, 2010 at 6:17 PM, anugrah wrote: > Stacks can be used. > > On Jul 20, 4:18 pm, mallesh wrote: > > We are given two strings. A and B. > > > > First few letters of A match with Last letters of B. We have to find > > the longest match in linear time. > > Example: > > char * A ="This is my first post to this group"; > > char *B= "to this group this is my post"; > > > > Algorithm should return starting position of substring "to this group" > > in string A. > > > > How do we do this? > > > > -Thanks and regards, > > Mallesh > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] os problem
Yes you do need virtual memory even if you have 4GB of RAM. Because if you do not have virtual memory, you could not have uniform addressing. and that prevents you creating the final elf file for each process. B'cos while compiling the program you don;t know the actual physical address your program is going to reside during execution. On Tue, Jul 20, 2010 at 11:46 AM, divya wrote: > You have 4GB ram, and at any time you have only 2 processes of 10mb > each. so do you need any virtual memory for it? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Boxes!!!
@Devendra sorted sequence of boxes are : box1 LBH - 7 8 9 box2 LBH - 6 7 8 box3 LBH - 3 7 2 Now longest decreasing sub-sequence of above will have all the three boxes as box1 >= box2 >= box3 ( box[i] >= box[j] if all L,B,H of box[i] are >= that of box[j] respectively .) so ans = ( 3 ) all boxes On Tue, Jul 20, 2010 at 8:34 AM, Devendra Pratap Singh < dpsingh.ii...@gmail.com> wrote: > @siddarth > > can u explain ur algo for > > box1 LBH - 7 8 9 > box2 LBH - 6 7 8 > box3 LBH - 3 7 2 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- siddharth shankar -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Boxes!!!
can we sort the boxes based on their volume in descending order and start highest volume box to lowest volume box (outer loop) -Inner loop start from lowest volume box to highest volume box upto the box considered in outer loop. Running time : O(n^2) On Tue, Jul 20, 2010 at 8:28 PM, Ashish Goel wrote: > kindly give an example > > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > > On Tue, Jul 20, 2010 at 8:04 AM, siddharth shankar < > siddharth.shanka...@gmail.com> wrote: > >> step : >> >> 1. Sorting LBH in decreasing order first on L than on B and than on >> H . >> >> 2. Now find longest decreasing sub-sequence of array of structures(LBH) . >> >> correct me if I m wrong !!! >> >> >> On Sun, Jul 18, 2010 at 11:44 PM, amit wrote: >> >>> Given a lot of cuboid boxes with different length, breadth and height. >>> We need to find the maximum subset which can fit into each other. >>> >>> For example: >>> If Box 1 has LBH as 7 8 9 >>> If Box 2 has LBH as 5 6 8 >>> If Box 3 has LBH as 5 8 7 >>> If Box 4 has LBH as 4 4 4 >>> >>> then answer is 1,2,4 >>> >>> A box can fit into another only and only if all dimensions of that is >>> less than the bigger box.Rotation of boxes is not possible. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algoge...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >>> >> >> >> -- >> siddharth shankar >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: XOR list
http://www.rawkam.com/?p=703 This link might help. On Tue, Jul 20, 2010 at 4:48 PM, Tech Id wrote: > Read the wikipedia entry on XOR linked lists and liked it a lot! > > http://en.wikipedia.org/wiki/XOR_linked_list > > Basic property they use is X#Y#X = X (# stands for XOR operation). > So, if you store X#Y in the pointer field, then next node pointer is > achievable by XORing this "pointer field" with previous field pointer. > And prev node pointer is achievable by XORing this "pointer field" > with next node pointer. > > Addition/Subtraction linked lists are also great! > Read them on the link above. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] os problem
You have 4GB ram, and at any time you have only 2 processes of 10mb each. so do you need any virtual memory for it? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Adobe Strings matching Puzzle.
Stacks can be used. On Jul 20, 4:18 pm, mallesh wrote: > We are given two strings. A and B. > > First few letters of A match with Last letters of B. We have to find > the longest match in linear time. > Example: > char * A ="This is my first post to this group"; > char *B= "to this group this is my post"; > > Algorithm should return starting position of substring "to this group" > in string A. > > How do we do this? > > -Thanks and regards, > Mallesh -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] array question
Given an array A of N elements, where N approaches infinity, there are S elements in it where S
[algogeeks] Re: Adobe Strings matching Puzzle.
Stack can be used to push the characters of the string A and then popped off while scanning through the string B until there is a difference in the character read from the string B and the one popped off from the stack.. On Jul 20, 4:40 pm, agnibha nath wrote: > You can try rabin-carp.. > > On Jul 20, 4:18 pm, mallesh wrote: > > > We are given two strings. A and B. > > > First few letters of A match with Last letters of B. We have to find > > the longest match in linear time. > > Example: > > char * A ="This is my first post to this group"; > > char *B= "to this group this is my post"; > > > Algorithm should return starting position of substring "to this group" > > in string A. > > > How do we do this? > > > -Thanks and regards, > > Mallesh -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Boxes!!!
This question has already been discussed. My solution goes like this Constructing trees... Box 1 dim: 7,8,9 Make it as root1. The root also has a counter associated with it. Now count1=1. Then Box 2 dim: 5,6,8 < 7,8,9. Make it as a left child of root1 and count1=2. Box 3 dim: 5,8,7 doesn't fit in any and hence make it a tree by itself i.e root2 its count2=1. Box 4 dim: 4,4,4 it can be made as the left child of box 2 as well as Box 3. count1=3, count2=2. Print the reverse inorder traversal of the highest counter valued tree. On Tue, Jul 20, 2010 at 8:28 PM, Ashish Goel wrote: > kindly give an example > > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > > On Tue, Jul 20, 2010 at 8:04 AM, siddharth shankar < > siddharth.shanka...@gmail.com> wrote: > >> step : >> >> 1. Sorting LBH in decreasing order first on L than on B and than on >> H . >> >> 2. Now find longest decreasing sub-sequence of array of structures(LBH) . >> >> correct me if I m wrong !!! >> >> >> On Sun, Jul 18, 2010 at 11:44 PM, amit wrote: >> >>> Given a lot of cuboid boxes with different length, breadth and height. >>> We need to find the maximum subset which can fit into each other. >>> >>> For example: >>> If Box 1 has LBH as 7 8 9 >>> If Box 2 has LBH as 5 6 8 >>> If Box 3 has LBH as 5 8 7 >>> If Box 4 has LBH as 4 4 4 >>> >>> then answer is 1,2,4 >>> >>> A box can fit into another only and only if all dimensions of that is >>> less than the bigger box.Rotation of boxes is not possible. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algoge...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >>> >> >> >> -- >> siddharth shankar >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] a google question
this ques was asked by google.. i* could find any gud soln than order n*n > > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Boxes!!!
@siddarth can u explain ur algo for box1 LBH - 7 8 9 box2 LBH - 6 7 8 box3 LBH - 3 7 2 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Adobe Puzzle
| | |\| | \ ---\ keep the blocks on corner like ths, then one more block from this block to corner of the inner square Mohit On Sun, Jul 18, 2010 at 11:38 PM, amit wrote: > Puzzle, A square Island surrounded by bigger square, and in between > there is infinite depth water. The distance between them is L. The > wooden blocks of L are given. > The L length block can't be placed in between to cross it, as it will > fall in water (just fitting). > How would you cross using these L length blocks. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Graph
how to find strongly connected components in a graph? plz explain the method of DFS of G and DFS of complement of G and how second DFS is related to first. give any other idea if anyone has -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] a google question
this ques was asked by google.. it could find any gud soln than order n*n On Mon, Jul 19, 2010 at 10:55 AM, 王奇凡 wrote: > @Kushwaha > Your programe is wrong. > Try this input: > a[ ] = {30,25,19,16,14}; > b[ ] = {20,18,12,10,8}; > > the right answer should be 50 48 45 43 42 > > but the program output is 50 48 45 43 37。 > > > > 2010/5/2 Jitendra Kushwaha > > Here is a solution of O(n) , taking 4 pointers 2 for each array >> >> >> #include >> #include >> using namespace std; >> >> #define N 10 >> >> int main(void) >> { >> int arr1[N] = {8,7,4,3,2,1,1,1,1,1}; >> int arr2[N] = {34,23,21,19,15,13,11,8,4,2}; >> int *p11,*p12,*p21,*p22; >> p11 = p12 = arr1; >> p21 = p22 = arr2; >> int f1; >> f1 = 0; >> >> for(int i=0;i> int ans=0; >> int a,b,c,d; >> a = *p11 + *p21; >> b = *p11 + *p22; >> c = *p21 + *p12; >> d = *(p11+1) + *(p21+1); >> >> //printf("a=%d b=%d c=%d d=%d\n",a,b,c,d); //debug >> >> if(f1==0)ans = a ,p12++ , p22++ , f1=1; >> >> else if(b >= c && b >= d )ans = b , p22++ ; >> >> else if(c >= b && c >= d )ans = c , p12++ ; >> >> elseans = d , p11++ , p21++ ,printf("4 "); >> >> printf("%d\n",ans); >> } >> } >> >> >> Regards >> Jitendra Kushwaha >> Undergradute Student >> Computer Science & Eng. >> MNNIT, Allahabad >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- With Regards Ankur Aggarwal -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Bitwise Ternary operator
Ternary operator- x? y : z Implement it in a function: int cond(int x, int y, int z); using only ~, !, ^, &, +, |, <<, >> no if statements, or loops or anything else, just those operators, and the function should correctly return y or z based on the value of x. You may use constants, but only 8 bit constants. You can cast all you want. You're not supposed to use extra variables, but in the end, it won't really matter, using vars just makes things cleaner. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: I am new to this group!
Welcome Chandan! I am also a newbie here. And am loving it! Let us solve some toughest puzzles/algorithms! On Jul 21, 4:31 pm, Chandan Balu wrote: > Wow really this is great group i have figured out.. > very very interesting love it... > > Thanks to all active memeber of this group -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Algorithm Books/Sites
I found a great place to read/contribute algorithms/puzzles: http://en.wikibooks.org/wiki/Algorithms#Why_a_Wikibook_on_Algorithms.3F (Its a featured book on wikipedia too) I plan to contribute to this book as much as I can. Please try to post in this book and paste links here. In a short span, this book's print out would adorn every programmer's shelf or his Kindle device. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Entryinto elite companies
Been to a recent show of 3 Idiots? Thats the advice given in it too! :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] I am new to this group!
Wow really this is great group i have figured out.. very very interesting love it... Thanks to all active memeber of this group -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Entryinto elite companies
@sharad, Well said.It can be summarized as "kamyaab hone ke liye nahi..kabil hone ke liye padho.." . On Wed, Jul 21, 2010 at 11:45 AM, sharad kumar wrote: > @aparichit:c brother u need to live,breathe enjoy algorithms not studyU > shldnt limit ur choice that just because you want to get placed in MS/Google > you want to do coding.You need to pursue coding as a career .you need to > do it for your self not for entering the company.even if you dont > make into MS atleast feel that you are specialI've knw guys here in US > who havent attended schools but have startedc their own firms which are > listed in nasdaq which take on MS/Google.in short i would like to say gain > knwledge and pursue excellence.. > > On Wed, Jul 21, 2010 at 10:49 AM, aparichith > wrote: >> >> Guys, Can some one tell me how to enter into elite companies like >> Yahoo, Microsoft,Symantec ,Amazon etc.. I did my engineering in IT in >> India , but I 'm not that phodu in coding etc >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > yezhu malai vaasa venkataramana Govinda Govinda > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Thanks & Regards Nikhil Agarwal Senior Undergraduate Computer Science & Engineering, National Institute Of Technology, Durgapur,India http://tech-nikk.blogspot.com http://beta.freshersworld.com/communities/nitd -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Copy Constructor and reference
If copy constructor were to use actual class object and not the reference, then it would need to make a copy. And to do that, it would need to call the copy constructor. And to do that, ... ==> Infinite recursion! On Jul 21, 12:08 pm, mallesh wrote: > In C++ Why is it that copy constructor uses only reference as > parameter and not the actual class? > I was given a hint that it has got something to do with stack. I think > it has got something to do with reentrant functions. > > In C also., I think the same thing happens when we pass struct as > parameter to a function, instead of copying the whole structure on to > stack, it takes struct variable's address. > > Can you please explain why this is so? > > -Thanks and regards, > Mallesh -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Copy Constructor and reference
In C++ Why is it that copy constructor uses only reference as parameter and not the actual class? I was given a hint that it has got something to do with stack. I think it has got something to do with reentrant functions. In C also., I think the same thing happens when we pass struct as parameter to a function, instead of copying the whole structure on to stack, it takes struct variable's address. Can you please explain why this is so? -Thanks and regards, Mallesh -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Adobe Puzzle
I am not sure if Center of Gravity calculations should be put into this solution before accepting it as a solution. Doesn't erappy's solution sound better and fool proof? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.