Re: [algogeeks] puzzle

2012-03-01 Thread annarao kataru
@anuraggood logic dude..


On Fri, Mar 2, 2012 at 10:26 AM, Gaurav Popli  wrote:
> great observation
> thanks!!
>
> On Wed, Feb 29, 2012 at 10:31 PM, Anurag atri  
> wrote:
>> @shady:
>> Observation only ..
>>
>> On Wed, Feb 29, 2012 at 9:03 PM, shady  wrote:
>>>
>>> anurag how did you reach that solution ?
>>> can you elaborate...
>>>
>>>
>>> On Wed, Feb 29, 2012 at 8:11 PM, Anurag atri 
>>> wrote:

 nth term : (n! + 2^n - n)


 On Wed, Feb 29, 2012 at 11:05 AM, Vaibhav Mittal
  wrote:
>
> Ntn else is provided..??
>
> On Feb 28, 2012 12:51 PM, "Gaurav Popli"  wrote:
>>
>> Given a sequance of natural numbers.
>>
>> Find N'th term of this sequence.
>>
>> a1=2, a2=4, a3=11, a4=36, a5=147, a6=778 ... ... ... ... aN.
>>
>>
>> this is a coding quesn and O(n) soln is also welcome...
>>
>> --
>> 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
>> 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 algogeeks@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.




 --
 Regards
 Anurag Atri


 --
 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
 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 algogeeks@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.
>>
>>
>>
>>
>> --
>> Regards
>> Anurag Atri
>> III year
>> Computer Engineering
>> Delhi College Of Engineering
>>
>>
>> --
>> 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
>> 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 algogeeks@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 algogeeks@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] c output

2011-10-28 Thread annarao kataru
can u plz tell me what exactly %*d  means?

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Linked List Problem

2011-09-29 Thread annarao kataru
@partik oh  i  forgot  it  thank  u for ur 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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Linked List Problem

2011-09-29 Thread annarao kataru
@prasanth   but how can u know that it will start after the difference
of the number of nodes (m-n) .  they may be similar even after  one
element also ??

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: adobe written round que

2011-09-21 Thread annarao kataru
can u explain the logic behind this

thanks in advance

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks]

2011-09-11 Thread annarao kataru
can any one write the code for checking the graph is connected and
contains any cycles  or not ?  using  bfs  technique ( plz code in
java )


thanks in advance..

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-09-08 Thread annarao kataru
@thank u

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks]

2011-09-07 Thread annarao kataru
hai in gcc compiler of fedora 14

int main()
{
int a=4;
printf("%d  %d  %d  %d",++a,++a,++a,++a);
return 0;
}
o/p  7 7 7 7

but if i replace ++a  with  a++ in above expn  i am getting o/p as  7 6 5 4

why ??  can u  explain ?

thanks  in advance...

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: C puzzle

2011-09-04 Thread annarao kataru
@nitesh   good  explanation brother

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: amazon question

2011-09-03 Thread annarao kataru
@sagar  for one time u r taking the return value of newly created
process and for other time u r taking return value of parentir it
right??

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Please explain its working..

2011-09-03 Thread annarao kataru
@sanjay  then why to put  str  in printf statement  .  is there no effect of
placing str in printf stat  . plz clarify??

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Adding Two no without using any operator...??

2011-09-01 Thread annarao kataru
@sharmila   u r using +  operator

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C Trick

2011-09-01 Thread annarao kataru
@priyanka   good one

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: apti????

2011-08-31 Thread annarao kataru
@ htross ;bcz  for the 6 bells  there is a gap of 5 intervals (1--
2-- 3-- 4-- 5-- 6)

 12   3  45  (intervals)

so for the 5 intervals it takes  30 sec
similarly for  12 rings  we have 11  intervals  so we get  66 sec for that

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] stack interview question

2011-08-31 Thread annarao kataru
@all  i think  c  is also  invalid  since  after  7  how 4  can popped
 with out poping  6 and 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.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c doubt

2011-08-31 Thread annarao kataru
why it(total) should be a multiple of 32  bits..can u clarify it?

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] apti????

2011-08-31 Thread annarao kataru
it takes  66  sec after 12correct me if i am wrong

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output

2011-08-31 Thread annarao kataru
yes it must be 4 3

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability question

2011-08-31 Thread annarao kataru
i think ur question is not clear dear acc  to ur question  the man
should reacch the station exactly at 5 or before 5 to get the first
train . then prob will be  1  otherwise  prob will be  0. correct me
if i am wrong.

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] fork()

2011-08-31 Thread annarao kataru
@swathi ::  why  it is  20  times ??   ur answer  is  correct  but
plz  explain the  process??

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] affect of change

2011-08-30 Thread annarao kataru
i think both c and  d  will be affected
@tech coder can u plz explain why d gives error.

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Adding Two no without using any operator...??

2011-08-28 Thread annarao kataru
@sourabh   ;  thank u very much

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Adding Two no without using any operator...??

2011-08-28 Thread annarao kataru
@saurubh singhhow it is working ?  plz  explain the logic

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Amazon Aptitude questions

2011-08-03 Thread annarao kataru
please answer the questions 1  and 4

-- 
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 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Water, Jug & Thinking Out of Box..Puzzle

2011-03-01 Thread annarao kataru
first take water with 3 quart jug and pour into the 5 quart jug ,in the same
way once again do it , this time u left with one quart in 3 quart jug and 5
quarts in 5 quart jug.pour out the water in 5 quart jug and shift the one
quart from 3 quart jug to five quart jug.finally u take 3 quarts with 3
quart jug and pour it in the 5 quart jug. now u r left with 4 quarts in five
quart jug  .  kar naidu

On Wed, Mar 2, 2011 at 1:47 AM, bittu  wrote:

> You have a five quart jug and a three quart jug, and an unlimited
> supply of water (but no measuring cups). How would you come up with
> exactly four quarts of water?
>
> NOTE: The jugs are oddly shaped, such that filling up exactly ‘half’
> of the jug would be impossible.
>
>
> Thanks & Regards
> Shashank Mani
>
> --
> 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
> 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 algogeeks@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] printing without loop

2011-03-01 Thread annarao kataru
i think,just as in the previous algorithm in place of cout simply use GOTO
>
> On Tue, Mar 1, 2011 at 3:40 PM, vaibhav shukla wrote:
>
>> write printf statemen 100 times. lolzzz
>>
>> On Tue, Mar 1, 2011 at 2:01 PM, Subhransu 
>> wrote:
>>
>>> Hey Guys,
>>>  @preetikatyagi : The question is pretty straight "Write a program
>>> printing number 1 to 100 without using any loop, GOTO statement , do while
>>> &  recursion "
>>>
>>> @sunny : We have to come up with one one logic not each time we have to
>>> change how we can add number's to make 100.
>>> It has to be with caller to decide how many number he has to print & the
>>> definition will take care of algorithm.
>>>
>>>
>>> *Subhransu Panigrahi
>>> *
>>> *Mobile:* *+91-9840931538*
>>>  *Email:* subhransu.panigr...@gmail.com
>>>
>>>
>>>
>>> On Tue, Mar 1, 2011 at 1:27 PM, sunny agrawal 
>>> wrote:
>>>
 int i=1;
 #define PRINT1 cout<>>> #define PRINT2 PRINT1 PRINT1
 #define PRINT4 PRINT2 PRINT2
 #define PRINT8 PRINT4 PRINT4
 #define PRINT16 PRINT8 PRINT8
 #define PRINT32 PRINT16 PRINT16
 #define PRINT64 PRINT32 PRINT32

 int main()
 {
  //as 100 = (1100100); we need to use PRINT64, PRINT32, and PRINT4
  PRINT64;
  PRINT32;
  PRINT4;
 }


 This will print 1 to 100. You can use this code to print from 1 to x
 (x<=128). You can extend it to larger numbers, by adding PRINT128,
 PRINT256...etc.

 On 3/1/11, preetika tyagi  wrote:
 > May be we can use *goto *statement?
 >
 > On Mon, Feb 28, 2011 at 10:36 PM, gaurav gupta
 > <1989.gau...@googlemail.com>wrote:
 >
 >> Questions is : You have to print 1 to n without using any loop( for,
 >> while,
 >> do-while, goto ) and recursion.
 >>
 >> Any suggestion?
 >>
 >>
 >> On Tue, Mar 1, 2011 at 10:52 AM, preetika tyagi
 >> wrote:
 >>
 >>> Can you elaborate on it and provide more details?
 >>>
 >>>
 >>> On Mon, Feb 28, 2011 at 10:14 PM, Subhransupanigrahi <
 >>> subhransu.panigr...@gmail.com> wrote:
 >>>
  Is there any way to print 1 to 10 (taking an example, it can also
 extend
  to 100) without using loop, recursion.
 
 
  Sent from my iPhone
 
  --
  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
  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 algogeeks@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,
 >> Gaurav Gupta
 >> 7676-999-350
 >>
 >> "Quality is never an accident. It is always result of intelligent
 effort"
 >> -
 >> John Ruskin
 >>
 >>
 >
 > --
 > 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
 > http://groups.google.com/group/algogeeks?hl=en.
 >
 >


 --
 Sunny Aggrawal
 B-Tech IV year,CSI
 Indian Institute Of Technology,Roorkee

 --
 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
 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 algogeeks@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.
>>>
>>
>>
>>
>> --
>>   best wishes!!
>> Vaibhav Shukla
>> DU-MCA
>>
>>  --
>> 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 unsubsc