Re: [algogeeks] reason

2011-08-15 Thread programming love
The internal representation of array is this: suppose that the address starts from decimal number 10 and integer occupies 2 bytes 10- 0002 ( num 2 in hex) 12- 0003 ( num 3 in hex) 14- 0004 ( num 4 in hex) Now p points to address 10 and is type char. (Even after type casts) p+1 will increment

[algogeeks] program puzzle

2011-08-15 Thread programming love
write a program to reverse the words in a give string. also state the time complexity of the algo. if the string is i am a programmer the output should be programmer a am i -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

[algogeeks] c++

2011-08-14 Thread programming love
Can someone please mail good c++ materials. If you guys have test your c++ skills by kanetkar plz upload. -- 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

[algogeeks] what is the difference between a class and structure in c++? pl help

2011-08-14 Thread programming love
-- 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 group at

[algogeeks] c++ ques

2011-08-14 Thread programming love
How do you prevent a c++ class from being inherited?? -- 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

Re: [algogeeks] Probability question.. help

2011-08-10 Thread programming love
is it 101/200?? On Wed, Aug 10, 2011 at 3:41 AM, Prakash D cegprak...@gmail.com wrote: is there anything like there should be atleast one man and one women should dance together? On Wed, Aug 10, 2011 at 2:26 AM, Shuaib Khan aries.shu...@gmail.comwrote: On Wed, Aug 10, 2011 at 1:45 AM,

Re: [algogeeks] pls help

2011-08-10 Thread programming love
@sagar and @brijesh: awesome explanation!!! too good! 1 doubt! the question says it has only 28 leaves. According to uour explanations, it has 81 leaves. how is it possible?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] pls help

2011-08-10 Thread programming love
@sagar: Thanks again :) But my doubt is it'll have more than 28 leaf nodes when the ques clearly sayd it shud have 28 leaf nodes. @vamshi: I kind of agree with what you say. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

[algogeeks] probability!-need help

2011-08-09 Thread programming love
Please send a link where i can find hard permutations and combinations and probability questions. Please help. If you guys have good e books or materials for apti questions, please mail me. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Algorithm

[algogeeks] solve this!

2011-08-09 Thread programming love
*In a crew of 12 members rowing team, 6 members are placed on either side of the boat. 3 men row on the right and 2 men row on the left. Find the number of ways of arranging the crew members on each side.* * * *Give the answer in terms of P and C. Example, 12C5 * 12P5+2P1*2C2 * -- You received

Re: [algogeeks] solve this!

2011-08-09 Thread programming love
left- 12C6*6C2 right- 12C6*6C3 Why is 6C2*6C3 combined in a single expression?? On Tue, Aug 9, 2011 at 4:27 PM, programming love love.for.programm...@gmail.com wrote: Here you are only selecting the crew members. How will you arrange them? -- You received this message because you

Re: [algogeeks] solve this!

2011-08-09 Thread programming love
got it! @sagar there shudn be 2's anywhere in the expression. The different combinations formed on the left hand side by choosing 6 out of 12 will ensure different combinations of other 6 people on the right. So 2*12C6 is not required. Example: P1,P3,P5,P7,P9, P11 on left will leave P2, P4, P6,

[algogeeks] c question!

2011-08-09 Thread programming love
*typedef struct {** * *char * a;** * *nodeptr next;** * *}*nodeptr;** * * * *what does nodeptr stand for??* -- 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] c question!

2011-08-09 Thread programming love
#includestdio.htypedef struct {char * a; }*nodeptr; main(){nodeptr *h;h-a=programming;printf(hi %s\n, h-a);} this gives an error. Please explain the concept behind this. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group,

Re: [algogeeks] Amazon question.

2011-08-09 Thread programming love
*Executing code with printf's for each iteration for better understanding.* #includestdio.h main(){ int n, i, j, k, t1=0, t2=0, t3, a[30]; printf(Enter the number of elements\n); scanf(%d, n); for(i=0; in; i++){ scanf(%d, a[i]); } for(i=0; in; i++) a[i]=a[i]*a[i]; k=n-1; i=0; j=k;

Re: [algogeeks] c question!

2011-08-09 Thread programming love
#includestdio.htypedef struct {char * a; }*nodeptr; main(){nodeptr h;h-a=programming;printf(hi %s\n, h-a);} @sidharth: thanks a lot for correcting me :) @aditya : no. there was some mistake; in the code i pasted above it's giving segmentation fault. Is it cause i'm initializing h without using

Re: [algogeeks] solve this!

2011-08-09 Thread programming love
for correction On Tue, Aug 9, 2011 at 4:39 PM, programming love love.for.programm...@gmail.com wrote: got it! @sagar there shudn be 2's anywhere in the expression. The different combinations formed on the left hand side by choosing 6 out of 12 will ensure different combinations of other 6

Re: [algogeeks] Re: Probability Puzzle

2011-08-09 Thread programming love
@Dave: Thanks for the explanation :) -- 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] C question

2011-08-09 Thread programming love
Correct me if i'm wrong. I think it's cos at a time it'll fetch the amount of bytes = to it's register's size. If a 32-bit machine is being used, answer will contain 4 bytes ff81 16-bit machine - ff81 -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Amazon Question

2011-08-08 Thread programming love
1. O(n) 2.b 4.c On Mon, Aug 8, 2011 at 7:24 PM, ankit sambyal ankitsamb...@gmail.comwrote: Plz give the answers ... 1. In a binary max heap containing n numbers, the smallest element can be found in time ?? 2. The number of total nodes in a complete balanced binary tree with n levels is,

[algogeeks] Probability

2011-08-08 Thread programming love
Hello guys! Please suggest good books to learn probability, Permutations combinations. Any tips and tricks or methods regarding the ways in which the problems can be solved will help. Plz reply and help me with this. -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Link list problem..

2011-08-08 Thread programming love
it's not possible in a singly linked list -- 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.

Re: [algogeeks] Re: amazon test question!!!

2011-08-08 Thread programming love
delete function will set parent-left_leaf=null and parent-right_leaf=null as a part of it's function. So after deletion of leaf nodes, the call returns to the parent nodes which are the current leaf nodes. Hence the option must be *deletion of the tree from bottom to top*. -- You received this

Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread programming love
@Dave: I guess 17/18 is correct. Since we have to *calculate the probability of getting a head in the 6th flip given that first 5 flips are a head*. Can you please explain how you got the values of consequent flips when you said this? *In fact, the probability is 3/5 for the first flip. After a

Re: [algogeeks] MS test

2011-08-07 Thread programming love
Why can't it be option b for 3rd one?? On Sun, Aug 7, 2011 at 11:30 AM, sukran dhawan sukrandha...@gmail.comwrote: a On Sun, Aug 7, 2011 at 11:07 AM, programming love love.for.programm...@gmail.com wrote: What is the answer for 3rd one?? 4th is 5. -- You received this message because

Re: [algogeeks] Paypal interview Questions

2011-08-07 Thread programming love
So is q 1 a C++ question?? On Sun, Aug 7, 2011 at 11:27 AM, hary rathor harry.rat...@gmail.com wrote: no c doesn't -- 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

Re: [algogeeks] MS test

2011-08-07 Thread programming love
Why is it so and y can't 0.1 be represented accurately in binary?? And what about the last option?? On Sun, Aug 7, 2011 at 11:43 AM, ankit sambyal ankitsamb...@gmail.comwrote: @programming love : 6.5 can be represented accurately in binary -- You received this message because you

Re: [algogeeks] MS test

2011-08-07 Thread programming love
And the last option?? Will that terminate too?? On Sun, Aug 7, 2011 at 11:48 AM, ankit sambyal ankitsamb...@gmail.comwrote: @programming love : 0.1 can't be represented accurately in binary. If u try to convert it into binary, it will not terminate. Try it !! But 6.5 can be converted

Re: [algogeeks] Re: Microsoft :)

2011-08-07 Thread programming love
@harshal: What was your score in the written round?? -- 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

Re: [algogeeks] Re: finding triplets

2011-08-07 Thread programming love
http://stackoverflow.com/questions/2032153/how-to-find-pythagorean-triplets-in-an-array-faster-than-on2 It provides a perfect solution -- 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: Directi question-centre of the tree

2011-08-07 Thread programming love
Traverse the tree inorder. Store the values in an array. Find the element in the middle of the array. On Sun, Aug 7, 2011 at 8:57 AM, subramania jeeva subramaniaje...@gmail.comwrote: 5 /\ 6 7 / 8 Here the centre is both 5 and 6 . we need to find both of them..:)

[algogeeks] MS test

2011-08-06 Thread programming love
People, the test was for 30 minutes! Someone please mail the answers and help us learn the concepts properly. -- 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

[algogeeks] MS test

2011-08-06 Thread programming love
What is the answer for 3rd one?? 4th is 5. -- 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.

[algogeeks] must read! a short cut method for apti!

2011-08-06 Thread programming love
*a nice post to find the number of zeroes in product of first n natural numbers!* http://forums.sureshkumar.net/brain-teasers-puzzles/22998-number-zeros.html -- 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] Paypal interview Questions

2011-08-06 Thread programming love
Does C support default arguments in function prototype?? -- 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