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
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
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
--
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
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
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,
@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
@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
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
*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
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
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,
*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
#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,
*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;
#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
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
@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
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
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,
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
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.
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
@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
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
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
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
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
@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
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
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..:)
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
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.
*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
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
35 matches
Mail list logo