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
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 add
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
algogeeks+unsubscr...@google
--
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
ht
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 th
@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 grou
@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 gr
is it 101/200??
On Wed, Aug 10, 2011 at 3:41 AM, Prakash D 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 wrote:
>
>>
>>
>> On Wed, Aug 10, 2011 at 1:45 AM, Brijesh Upadhyay <
>> brijeshupa
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
"Algori
@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 m
ight will be
>> fixed.
>> thanks 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.
>>>
#includetypedef 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 mal
*Executing code with printf's for each iteration for better understanding.*
#include
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; i=0;k--){
printf("iteration %d\n", t2);
for(j=k,i=0;(ihttp://groups.google.com/group/algogeeks?
#includetypedef 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,
@rohith, what if that statement is removed. Now, what will nodeptr stand
for?
On Tue, Aug 9, 2011 at 8:09 PM, rohit jangid wrote:
> it will give error in line 3 because nodeptr is undefined till that point..
>
> On Aug 9, 2011 8:03 PM, "programming love"
> wrote:
>
*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
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, P8,
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
Here you are only selecting the crew members. How will you arrange them?
--
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
*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 t
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
@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 h
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
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.
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
1. O(n)
2.b
4.c
On Mon, Aug 8, 2011 at 7:24 PM, ankit sambyal wrote:
> 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,
> a)3^n + 1
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
wrote:
> 5
> /\
> 6 7
>/
> 8
>
> Here the centre is both 5 and 6 . we need to find both of them..:)
>
>
>
>
>
>
>
>
>
> Cheers
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 algogeeks@googlegroup
@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
algogeeks+unsubscr...@go
And the last option?? Will that terminate too??
On Sun, Aug 7, 2011 at 11:48 AM, ankit sambyal wrote:
> @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.
>
&g
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 wrote:
> @programming love : 6.5 can be represented accurately in binary
>
> --
> You received this message because you are subscri
So is q 1 a C++ question??
On Sun, Aug 7, 2011 at 11:27 AM, hary rathor 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 unsubscribe from th
Why can't it be option b for 3rd one??
On Sun, Aug 7, 2011 at 11:30 AM, sukran dhawan wrote:
> 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.
>>
>> --
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
algogeeks+unsubscr...@goo
*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
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.
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
37 matches
Mail list logo