Re: [algogeeks] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread Nikhil Kumar
Testing profile : You have to test the features developed by others.Kinda
bruteforce work , you will be given a set of commands and a large no. of
test cases.All you have to do is run commands and validate test cases again
and again.Boring.Only periodic growth.

Developers: Much better. You have to develop new features yourself.You will
apply concepts to mould the product.Growth chances are good.Growth basis is
your talent and capability.



On Thu, Sep 15, 2011 at 11:07 AM, abhinav gupta abhinav@gmail.comwrote:

 in my opinion developer profile is better than testing...one


 On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma rahul23111...@gmail.comwrote:

 hey guys plz tell the difference b/w testing n develp.  profile ??? n
 joing i n testing profile has growth as much as in develpoer???plz
 tell soon..?should i go in testing profile in lagre industry or in
 developer in medium scale...plz hepl

 --
 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.




-- 
Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
B.E.( Information Technology ) ,
NSIT Delhi , 2007-2011

-- 
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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread vivek goel
hello  nikhil,

suppose if we currently opt  for testing OR consultant  profile

then  Is it possible to switch to Software Development profile   later
on.
plss tell me...

On 9/15/11, Nikhil Kumar nikhil.nsit...@gmail.com wrote:
 Testing profile : You have to test the features developed by others.Kinda
 bruteforce work , you will be given a set of commands and a large no. of
 test cases.All you have to do is run commands and validate test cases again
 and again.Boring.Only periodic growth.

 Developers: Much better. You have to develop new features yourself.You will
 apply concepts to mould the product.Growth chances are good.Growth basis is
 your talent and capability.



 On Thu, Sep 15, 2011 at 11:07 AM, abhinav gupta
 abhinav@gmail.comwrote:

 in my opinion developer profile is better than testing...one


 On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma
 rahul23111...@gmail.comwrote:

 hey guys plz tell the difference b/w testing n develp.  profile ??? n
 joing i n testing profile has growth as much as in develpoer???plz
 tell soon..?should i go in testing profile in lagre industry or in
 developer in medium scale...plz hepl

 --
 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.




 --
 Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
 B.E.( Information Technology ) ,
 NSIT Delhi , 2007-2011

 --
 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] program

2011-09-15 Thread sagar pareek
Use hashing like counting sort...

On Wed, Sep 14, 2011 at 11:20 AM, raj raji20.pat...@gmail.com wrote:

 program to find the top 3 repeating number from the given array
 eg
 You r given an array and u have to find out the top 3 repeated
 numbers.
  for ex: GAURAV[]={20,8,3,7,8,9,20,6,4,6,20,8,20}
 so the output will be: 20 is repeated 4 times 8 is repeated 3 times 6
 is repeated 2 times.

 --
 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
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread siddharam suresh
testing is very broad area of s/w development.
first get clear about the job,

when i was giving interview with MS for SDET, they said its developing test
s/w for already build s/w.   my view, testing requires more skills than
developer, to find out the flaws in the code.

Thank you,
Sid.



On Thu, Sep 15, 2011 at 11:42 AM, vivek goel vivek.thapar2...@gmail.comwrote:

 hello  nikhil,

suppose if we currently opt  for testing OR consultant
  profile

 then  Is it possible to switch to Software Development profile   later
 on.
 plss tell me...

 On 9/15/11, Nikhil Kumar nikhil.nsit...@gmail.com wrote:
  Testing profile : You have to test the features developed by others.Kinda
  bruteforce work , you will be given a set of commands and a large no. of
  test cases.All you have to do is run commands and validate test cases
 again
  and again.Boring.Only periodic growth.
 
  Developers: Much better. You have to develop new features yourself.You
 will
  apply concepts to mould the product.Growth chances are good.Growth basis
 is
  your talent and capability.
 
 
 
  On Thu, Sep 15, 2011 at 11:07 AM, abhinav gupta
  abhinav@gmail.comwrote:
 
  in my opinion developer profile is better than testing...one
 
 
  On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma
  rahul23111...@gmail.comwrote:
 
  hey guys plz tell the difference b/w testing n develp.  profile ??? n
  joing i n testing profile has growth as much as in develpoer???plz
  tell soon..?should i go in testing profile in lagre industry or in
  developer in medium scale...plz hepl
 
  --
  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.
 
 
 
 
  --
  Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
  B.E.( Information Technology ) ,
  NSIT Delhi , 2007-2011
 
  --
  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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread Prem Krishna Chettri
Its an open ended question for the New Guys..
 So.. here its some analysis..
   If its project is RD with high profile org like Amazon.. Google.. SDET
is Developer in Test  (Framework Developer for TESTING) but QA is a Complete
Tester (Mostly No Code Work).. So SDET will develop in basically in Some
Scripting Languages like Ruby.. Python .. Shell etc..
   However Development is not only writing feature in Complied Languages
like C/C++ and Java but also maintenance and bug Fix..


  So, for High profile org.. its always a great wk Exp in any of these filed
. but for medium org its always Dev on top (few Exception)..

Now its your Choice.


Prem

On Thu, Sep 15, 2011 at 12:10 PM, siddharam suresh
siddharam@gmail.comwrote:

 testing is very broad area of s/w development.
 first get clear about the job,

 when i was giving interview with MS for SDET, they said its developing test
 s/w for already build s/w.   my view, testing requires more skills than
 developer, to find out the flaws in the code.

 Thank you,
 Sid.



 On Thu, Sep 15, 2011 at 11:42 AM, vivek goel 
 vivek.thapar2...@gmail.comwrote:

 hello  nikhil,

suppose if we currently opt  for testing OR consultant
  profile

 then  Is it possible to switch to Software Development profile   later
 on.
 plss tell me...

 On 9/15/11, Nikhil Kumar nikhil.nsit...@gmail.com wrote:
  Testing profile : You have to test the features developed by
 others.Kinda
  bruteforce work , you will be given a set of commands and a large no. of
  test cases.All you have to do is run commands and validate test cases
 again
  and again.Boring.Only periodic growth.
 
  Developers: Much better. You have to develop new features yourself.You
 will
  apply concepts to mould the product.Growth chances are good.Growth basis
 is
  your talent and capability.
 
 
 
  On Thu, Sep 15, 2011 at 11:07 AM, abhinav gupta
  abhinav@gmail.comwrote:
 
  in my opinion developer profile is better than testing...one
 
 
  On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma
  rahul23111...@gmail.comwrote:
 
  hey guys plz tell the difference b/w testing n develp.  profile ??? n
  joing i n testing profile has growth as much as in develpoer???plz
  tell soon..?should i go in testing profile in lagre industry or in
  developer in medium scale...plz hepl
 
  --
  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.
 
 
 
 
  --
  Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
  B.E.( Information Technology ) ,
  NSIT Delhi , 2007-2011
 
  --
  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.


-- 
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] Math Puzzle

2011-09-15 Thread abhinav gupta
Above expression will be

(p^3+q^3+r^3)/pqr

if a+b+c=0, then a^3+b^3+c^3 = 3abc

so,

3pqr/pqr=3



On Thu, Sep 15, 2011 at 10:59 AM, rahul sharma rahul23111...@gmail.comwrote:

 hw?


 On Thu, Sep 15, 2011 at 10:57 AM, Tamanna Afroze afroze...@gmail.comwrote:

 yah the ans is 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.


 --
 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.




-- 
@ |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.



[algogeeks] A logical Question

2011-09-15 Thread Tamanna Afroze
*If you are on a boat and you throw out a suitcase, Will the level of water
increase.*

-- 
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] A logical Question

2011-09-15 Thread sagar pareek
it depends that weather boat is on the water or not :P

On Thu, Sep 15, 2011 at 12:58 PM, Tamanna Afroze afroze...@gmail.comwrote:


 *If you are on a boat and you throw out a suitcase, Will the level of
 water increase.*

 --
 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
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
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] A logical Question

2011-09-15 Thread UTKARSH SRIVASTAV
hi it;s a physics question  of t bouyant force 

On Thu, Sep 15, 2011 at 1:53 PM, sagar pareek sagarpar...@gmail.com wrote:

 it depends that weather boat is on the water or not :P


 On Thu, Sep 15, 2011 at 12:58 PM, Tamanna Afroze afroze...@gmail.comwrote:


 *If you are on a boat and you throw out a suitcase, Will the level of
 water increase.*

 --
 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
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 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.




-- 
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@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 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] A logical Question

2011-09-15 Thread Pradip Singh
it will be same bcz the suitcase was already with him.

On Thu, Sep 15, 2011 at 1:32 AM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:

 hi it;s a physics question  of t bouyant force 


 On Thu, Sep 15, 2011 at 1:53 PM, sagar pareek sagarpar...@gmail.comwrote:

 it depends that weather boat is on the water or not :P


 On Thu, Sep 15, 2011 at 12:58 PM, Tamanna Afroze afroze...@gmail.comwrote:


 *If you are on a boat and you throw out a suitcase, Will the level of
 water increase.*

 --
 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
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 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.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @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 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] Can we define a bijective function from set(strings) ------ Q?

2011-09-15 Thread bharatkumar bagana
@Anil : is there any reason in taking 31 in function pow(31,x) ?.

On Wed, Sep 14, 2011 at 10:31 AM, AnilKumar B akumarb2...@gmail.com wrote:

 Hi,

 Can we define a bijective function from set(strings) -- Q?

 I thought of using a polynomial function, for example:


 f(ANIL)=pow(31,0)*ASCII(L)+pow(31,1)*ASCII(I)+pow(31,2)*ASCII(I)+pow(31,3)*ASCII(A),

 In this f will be one-one from set(Strings)---N, but I don't whether
 is onto or not? And one more thing for all combinations of Strings the
 output of this hash function might be 9,223,372,036,854,775,807, which
 cannot be represented in JAVA.

 So is it possible to define a bijective from Set(Strings)Q?

 Thanks  Regards,
 B Anil Kumar.

 --
 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.




-- 

**Please do not print this e-mail until urgent requirement. Go Green!!
Save Papers = Save Trees
*BharatKumar Bagana*
**http://www.google.com/profiles/bagana.bharatkumarhttp://www.google.com/profiles/bagana.bharatkumar
*
Mobile +91 8056127652*
bagana.bharatku...@gmail.com

-- 
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] A logical Question

2011-09-15 Thread siddharth srivastava
On 15 September 2011 12:58, Tamanna Afroze afroze...@gmail.com wrote:


 *If you are on a boat and you throw out a suitcase, Will the level of
 water increase.*


No, (if boat is in water and suitcase is thrown in water)
No (if boat is in water and you throw out suitcase on land/bank)
Yes (if you, boat and suitcase are not in water, though minuscule or may be
non-observable)




  --
 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
Siddharth Srivastava

-- 
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] A logical Question

2011-09-15 Thread Siddhartha Banerjee
it will decrease... initially suitcase was removing water equal to its
weight, now it displaces water eual to its volume... as  density of suitcase
is more than that of water (assumption) so the water level decreases...

-- 
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] C++ Query...

2011-09-15 Thread teja bala
How to access class private data members with a pointer?

thx 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] A logical Question

2011-09-15 Thread hary rathor
no increase or no decrease

-- 
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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread bharatkumar bagana
+1 prem

On Thu, Sep 15, 2011 at 2:54 AM, Prem Krishna Chettri hprem...@gmail.comwrote:

 Its an open ended question for the New Guys..
  So.. here its some analysis..
If its project is RD with high profile org like Amazon.. Google.. SDET
 is Developer in Test  (Framework Developer for TESTING) but QA is a Complete
 Tester (Mostly No Code Work).. So SDET will develop in basically in Some
 Scripting Languages like Ruby.. Python .. Shell etc..
However Development is not only writing feature in Complied Languages
 like C/C++ and Java but also maintenance and bug Fix..


   So, for High profile org.. its always a great wk Exp in any of these
 filed . but for medium org its always Dev on top (few Exception)..

 Now its your Choice.


 Prem

 On Thu, Sep 15, 2011 at 12:10 PM, siddharam suresh 
 siddharam@gmail.com wrote:

 testing is very broad area of s/w development.
 first get clear about the job,

  when i was giving interview with MS for SDET, they said its developing
 test s/w for already build s/w.   my view, testing requires more skills than
 developer, to find out the flaws in the code.

 Thank you,
 Sid.



 On Thu, Sep 15, 2011 at 11:42 AM, vivek goel 
 vivek.thapar2...@gmail.comwrote:

 hello  nikhil,

suppose if we currently opt  for testing OR consultant
  profile

 then  Is it possible to switch to Software Development profile   later
 on.
 plss tell me...

 On 9/15/11, Nikhil Kumar nikhil.nsit...@gmail.com wrote:
  Testing profile : You have to test the features developed by
 others.Kinda
  bruteforce work , you will be given a set of commands and a large no.
 of
  test cases.All you have to do is run commands and validate test cases
 again
  and again.Boring.Only periodic growth.
 
  Developers: Much better. You have to develop new features yourself.You
 will
  apply concepts to mould the product.Growth chances are good.Growth
 basis is
  your talent and capability.
 
 
 
  On Thu, Sep 15, 2011 at 11:07 AM, abhinav gupta
  abhinav@gmail.comwrote:
 
  in my opinion developer profile is better than testing...one
 
 
  On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma
  rahul23111...@gmail.comwrote:
 
  hey guys plz tell the difference b/w testing n develp.  profile ??? n
  joing i n testing profile has growth as much as in develpoer???plz
  tell soon..?should i go in testing profile in lagre industry or in
  developer in medium scale...plz hepl
 
  --
  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.
 
 
 
 
  --
  Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
  B.E.( Information Technology ) ,
  NSIT Delhi , 2007-2011
 
  --
  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.


  --
 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.




-- 

**Please do not print this e-mail until urgent requirement. Go Green!!
Save Papers = Save Trees
*BharatKumar Bagana*
**http://www.google.com/profiles/bagana.bharatkumarhttp://www.google.com/profiles/bagana.bharatkumar
*
Mobile +91 8056127652*
bagana.bharatku...@gmail.com

-- 
You received this 

Re: [algogeeks]

2011-09-15 Thread Siddhartha Banerjee
sort all elements :nlogn
If the last 2 arrays are B and C, then sort elements of the form
(bi+cj):O(n^2) time O(n^2) space
[for the above step, smallest element  in  b1+c1,next element is smaller of
(b1+c2) and(c1+b2), increase pointer accordingly.  If at one step, the
element under consideration is bi and cj, then the next smallest element is
min(bi+c(j+1),b(i+1)+cj) ]
for each element in A, see if corresponding element is there in [B+C]
O(nlogn)
If yes, then search for  the corresponding two elements in array B and C
O(nlogn)

total time O(n^2), space = O (n^2)

-- 
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++ Query...

2011-09-15 Thread bharatkumar bagana
@teja : r u looking for something like this...
#includestdio.h
#includestdlib.h
class Hai
{
 public :
int* getPointerToPrivate()
{
return i;
}
void setI(int j)
{
i=j;
}
 private:
int i;
};
main()
{
 Hai h;
 h.setI(10);
 int *i=h.getPointerToPrivate();
 printf(%d,*i);
}

On Thu, Sep 15, 2011 at 6:41 AM, teja bala pawanjalsa.t...@gmail.comwrote:

 How to access class private data members with a pointer?

 thx 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.




-- 

**Please do not print this e-mail until urgent requirement. Go Green!!
Save Papers = Save Trees
*BharatKumar Bagana*
**http://www.google.com/profiles/bagana.bharatkumarhttp://www.google.com/profiles/bagana.bharatkumar
*
Mobile +91 8056127652*
bagana.bharatku...@gmail.com

-- 
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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread sukran dhawan
Just opt fot testing ... If there is a slot for development in the company
they will look for the guys in testing first b4 actually going for outside
ppl

And u can easily shift from testing to development if u perform well


On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma rahul23111...@gmail.comwrote:

 hey guys plz tell the difference b/w testing n develp.  profile ??? n
 joing i n testing profile has growth as much as in develpoer???plz
 tell soon..?should i go in testing profile in lagre industry or in
 developer in medium scale...plz hepl

 --
 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] Re: Microsoft Question

2011-09-15 Thread Yogesh Yadav
For Stack:

just make a structure:

struct stack_with_priorityqueue
{
  int num;
  int priority;
  struct stack_with_priorityqueue *ptr;
}

now when we add another number just increase the priority... priority++


For Queue:

do same...just decrease priority...priority--



...

On Wed, Sep 14, 2011 at 4:41 PM, bharatkumar bagana 
bagana.bharatku...@gmail.com wrote:

 The well known examples of priority queue is minheap and maxheap..
 i guess the question is how do we implement one of these(at least) using
 queue?


 On Wed, Sep 14, 2011 at 9:08 AM, Ankuj Gupta ankuj2...@gmail.com wrote:

 I guess the functionality of priority should be maintained

 On Sep 13, 11:59 pm, Ankur Garg ankurga...@gmail.com wrote:
  But dude are u saying stack will be implemented as a map with
  value,priority
 
  and then choose element based on priority ?
 
  regards
  Ankur
 
 
 
 
 
 
 
  On Tue, Sep 13, 2011 at 10:16 PM, Ankuj Gupta ankuj2...@gmail.com
 wrote:
 
   For stack :- Keep incrementing the priority of each pushed element. So
   the last pushed element will have the greatest priority and the
   element pushed first will have
   lowest priority.
   For queue:- keep decrementing the priority of each inserted element.
 
   On Sep 13, 1:45 am, Ankur Garg ankurga...@gmail.com wrote:
How to Implement a Queue with a Priority Queue
Similarly how woud you implement Stack with Priority Queue
 
   --
   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.




 --

 **Please do not print this e-mail until urgent requirement. Go Green!!
 Save Papers = Save Trees
 *BharatKumar Bagana*
 **http://www.google.com/profiles/bagana.bharatkumarhttp://www.google.com/profiles/bagana.bharatkumar
 *
 Mobile +91 8056127652*
 bagana.bharatku...@gmail.com


  --
 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++ Query...

2011-09-15 Thread teja bala
@ BHARATH

exactly very thx

On Thu, Sep 15, 2011 at 5:22 PM, bharatkumar bagana 
bagana.bharatku...@gmail.com wrote:

 @teja : r u looking for something like this...
 #includestdio.h
 #includestdlib.h
 class Hai
 {
  public :
 int* getPointerToPrivate()
 {
 return i;
 }
 void setI(int j)
 {
 i=j;
 }
  private:
 int i;
 };
 main()
 {
  Hai h;
  h.setI(10);
  int *i=h.getPointerToPrivate();
  printf(%d,*i);

 }

 On Thu, Sep 15, 2011 at 6:41 AM, teja bala pawanjalsa.t...@gmail.comwrote:

 How to access class private data members with a pointer?

 thx 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.




 --

 **Please do not print this e-mail until urgent requirement. Go Green!!
 Save Papers = Save Trees
 *BharatKumar Bagana*
 **http://www.google.com/profiles/bagana.bharatkumarhttp://www.google.com/profiles/bagana.bharatkumar
 *
 Mobile +91 8056127652*
 bagana.bharatku...@gmail.com


  --
 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] Re: MICROSOFT WRITTEN IN VASAVI

2011-09-15 Thread Dheeraj Sharma
char str[10];
int length,count;
void fun(int x)
{
 if(x==length)
 printf(%d %s\n,++count,str);
 else
 {
 fun(x+1);
 str[x]-=32;
 fun(x+1);
 str[x]+=32;
 }
}
int main()
{
scanf(%s,str);
length=strlen(str);
fun(0);
getch();
}

On Wed, Sep 14, 2011 at 10:05 AM, mohit verma mohit89m...@gmail.com wrote:

 take an array containing all original upper-case  letters and their smaller
 case letters and now the problem is reduced to print all substrings
 containing length of original string.


 On Wed, Sep 14, 2011 at 8:55 PM, teja bala pawanjalsa.t...@gmail.comwrote:


 //dis one works check it out..

 #includectype.h
 #includestdio.h
 #includestring.h
 #includeassert.h
 void toggler(char* x, int pos)
 {
   if(pos==0){ printf(%s\n,x); return; }
 //  printf(String is now: %s\n,x);
   x[pos-1] = toupper(x[pos-1]);
   toggler(x, pos-1);
   x[pos-1] = tolower(x[pos-1]);
   toggler(x, pos-1);
 return;
 }
 int main(void){
   char str[500];
   scanf(%s,str);
   toggler(str, strlen(str));
   return 0;
  }

 On Wed, Sep 14, 2011 at 7:22 PM, Dave dave_and_da...@juno.com wrote:

 @Teja: Oops. I was wrong. By the time I fix my conceptual error, the
 code is no shorter than Anshu's.

 Dave

 On Sep 14, 8:14 am, teja bala pawanjalsa.t...@gmail.com wrote:
  @DAVE
 
  dis was the o/p for ur prog.
 
  aBC
  abC
  abC
  abc
  abc
  abc
  abc
  abc
 
  #includeiostream.h
  main()
  {
  int i, n = 3;
  char *s=ABC;
  for( i = 0 ; i  (1n) ; ++i )
  {
   s[i^(i1)] ^= 'a' ^ 'A';
   cout  s  endl;
 
 
 
  }
  }- Hide quoted text -
 
  - Show quoted text -

 --
 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.




 --
 
 *MOHIT VERMA*

  --
 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.




-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra

-- 
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] ASP connection prblm

2011-09-15 Thread himanshu kansal
if i use the connection string.
sConn= Provider=SQLOLEDB;Integrated
Security=SSPI;Trusted_Connection=yes;Initial Catalog=master;Connect
Timeout=0;Data Source=VIVEK-PC

then i am able to connect to master database in sql server 2008..

but if i use the connection string
sConn= Provider=SQLOLEDB;Integrated
Security=SSPI;Trusted_Connection=yes;Initial Catalog=pubs;Connect
Timeout=0;Data Source=VIVEK-PC

then it gives me error.
Microsoft OLE DB Provider for SQL Server error '80004005'

Cannot open database pubs requested by the login. The login failed.

PS: I am using windows authenticationcan anybody tell me the how
to correct  this problem.

-- 
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] Find the element in Array

2011-09-15 Thread Yogesh Yadav
*//this method can be applied only when
the value of elements in array are not very large

int count[];

for(i = 0 to n-1)
  {
if(count[arr[i]] == 1)
  printf( %d , arr[i]);
else
 count[arr[i]]++;
  }*


..

On Wed, Aug 31, 2011 at 12:38 PM, Yuchen Liao lycdra...@gmail.com wrote:

 Hi Akshat,

 I think that you are wrong here. For example, I have 1, 1, 2 in the
 array. The output will be 2. But not 1.



 On Wed, Aug 31, 2011 at 1:57 AM, Akshat Sapra sapraaks...@gmail.comwrote:

 Solution:

 arr[n],sum = 0;


 for ( int i = 0 ; i  n; i++ ) {
sum ^= arr[i];
 }

 print sum; // required number

 --


 Akshat Sapra
 Under Graduation(B.Tech)
 IIIT-Allahabad(Amethi Campus)
 --
 sapraaks...@gmail.com
 akshatsapr...@gmail.com
 rit2009...@iiita.ac.in
 sapraaks...@facebook.com

  --
 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.




 --
 from Yuchen Liao via Gmail

 --
 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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread Nikhil Kumar
@vivek : If you opt for testing , you can always become a developer.It won't
go hard on you.

And I don't really know about consultant, you have to ask some guy in the
force.

On Thu, Sep 15, 2011 at 5:15 AM, sukran dhawan sukrandha...@gmail.comwrote:

 Just opt fot testing ... If there is a slot for development in the company
 they will look for the guys in testing first b4 actually going for outside
 ppl

 And u can easily shift from testing to development if u perform well


 On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma rahul23111...@gmail.comwrote:

 hey guys plz tell the difference b/w testing n develp.  profile ??? n
 joing i n testing profile has growth as much as in develpoer???plz
 tell soon..?should i go in testing profile in lagre industry or in
 developer in medium scale...plz hepl

 --
 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.




-- 
Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
B.E.( Information Technology ) ,
NSIT Delhi , 2007-2011

-- 
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-15 Thread saurabh singh
Well actually sh means *The bourne shell.*Since the bourne shell is replaced
by bash nowdays ubuntu(I am not sure but the debian OS too)have replaced sh
as a command line interpreter(*i.e it is not bourne shell)*.

On Thu, Sep 15, 2011 at 11:29 AM, Amol Sharma amolsharm...@gmail.comwrote:

 @saurabh..problem again

 now i tried the same program on redhat and it is now giving the expected
 output(tried both the shells bash and sh)...i have attached the
 screenshot of my activity
 i think it is depending on os specificationthat is...which shell
 version it is using..what do u think ??








 --


 Amol Sharma
 Third Year Student
 Computer Science and Engineering
 MNNIT Allahabad
  http://gplus.to/amolsharma99 
 http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99





 On Thu, Sep 15, 2011 at 9:45 AM, rahul vatsa vatsa.ra...@gmail.comwrote:

 @utkarsh, its opensuse.

 @saurabh, i agree wht u r saying i hd also checkd that in man page. nd hd
 tried @terminal with sh, and it hadn't expanded. bt wen i run this prog on
 my m/c, it gives the expanded output.


 linux-7ap5:/home/user/test # ls
 system.c
 linux-7ap5:/home/user/test # cat system.c
 #include stdio.h

 main()
 {
  system(echo {a,b,c}{a,b,c}{a,b,c} );
 }
 linux-7ap5:/home/user/test # make system
 cc system.c   -o system
 linux-7ap5:/home/user/test # ./system
 aaa aab aac aba abb abc aca acb acc baa bab bac bba bbb bbc bca bcb bcc
 caa cab cac cba cbb cbc cca ccb ccc
 linux-7ap5:/home/user/test #



 On Wed, Sep 14, 2011 at 10:54 PM, saurabh singh saurab...@gmail.comwrote:

 If you go a bit deeper into the system calls that system makes you will
 realize that the argument is actually expanded as sh -c echo
 {abc}{abc}{abc}
 The expansion facility is provided by bash but not sh.(You may verify my
 claim)
 The default shell is bash.*switch to sh mode and you will realize whats
 happening.*


 On Thu, Sep 15, 2011 at 2:43 AM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 @rahul have you tried it n your system and if yes then which os?


  On Thu, Sep 15, 2011 at 2:28 AM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 yes it's giving wrong output on terminal using gcc compiler in ubuntu


 On Thu, Sep 15, 2011 at 1:25 AM, Amol Sharma 
 amolsharm...@gmail.comwrote:

 though it is giving the expected output on the ideone but i am not
 getting the the output on the terminal using gcc compiler it is just
 printing {a,b,c}{a,b,c}{a,b,c} what could be the reason ?

 my OS- Ubuntu 10.04
 @rahul what's ur os ?

 --


 Amol Sharma
 Third Year Student
 Computer Science and Engineering
 MNNIT Allahabad
  http://gplus.to/amolsharma99 
 http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99





 On Thu, Sep 15, 2011 at 1:20 AM, Amol Sharma 
 amolsharm...@gmail.comwrote:

 http://ideone.com/WQxfK
 --


 Amol Sharma
 Third Year Student
 Computer Science and Engineering
 MNNIT Allahabad
  http://gplus.to/amolsharma99 
 http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99





 On Thu, Sep 15, 2011 at 1:13 AM, rahul vatsa 
 vatsa.ra...@gmail.comwrote:

 i tried ur code  it gives the same output as wen u execute the
 command on terminal.


 On Wed, Sep 14, 2011 at 3:03 PM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:


 if i write on terminal echo {a,b,c}{a,b,c}{a,b,c} then i get the
 output all possible combination of a,b,c and if i write like this

 main()
 {
  system(echo {a,b,c}{a,b,c}{a,b,c} );
 }
 output : {a,b,c}{a,b,c}{a,b,c}
 why?
 in system command whatever we write is taken like a command


 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @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 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.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @MNNIT ALLAHABAD*





 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @MNNIT 

[algogeeks] no of elements of the array

2011-09-15 Thread rahul vatsa
if i pass an int array to a function, is it possible to find out the no of
elements in the called function ?

-- 
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] Re: no of elements of the array

2011-09-15 Thread Don
Not really. Usually you would need a second parameter indicating the
size of the input. In theory it might be possible to put a marker
value at the end of the array.

Most implementations of malloc store the size of the memory block in
the word immediately before the returned address. This is used when
you free the memory. So some programmers use things like:

int *data = (int *)malloc(n*sizeof(int));

And then later:
int size = *(data-4)/sizeof(int);

This would not work if data was declared as an array rather than as a
malloced pointer. It is also completely implementation dependent, so I
would not recommend it for any code which someone may someday have to
maintain.

Don

On Sep 15, 10:59 am, rahul vatsa vatsa.ra...@gmail.com wrote:
 if i pass an int array to a function, is it possible to find out the no of
 elements in the called function ?

-- 
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] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread ankurmittal
Hello Guys,

We have got news that Microsoft would be conducting just the written
test on our campus ( PEC, Chandigarh) on September 19.. I have gone
through all the discussion on this forum and haven't seen a thread
where only such type of test has been discussed.

According to the company only 1 hour written test would be taken and
nothing else and it seems that the guys from Microsoft wont be coming
some external agency would be conducting the test. So if someone could
shed some light on it, what the pattern would be and..

-- 
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] Re: Math Puzzle

2011-09-15 Thread Don
It might be 3, but it doesn't have to be 3.
Don

On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
 if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??

 how to solve this??

-- 
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: Math Puzzle

2011-09-15 Thread abhinav gupta
Shut up...its 3,,

On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:

 It might be 3, but it doesn't have to be 3.
 Don

 On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
  if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??
 
  how to solve this??

 --
 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.




-- 
@ |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: Math Puzzle

2011-09-15 Thread Piyush Grover
Don is right

if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!!



On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta
guptaabhinav...@gmail.comwrote:

 Shut up...its 3,,


 On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:

 It might be 3, but it doesn't have to be 3.
 Don

 On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
  if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??
 
  how to solve this??

 --
 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.




 --
 @ |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.


-- 
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] Re: Math Puzzle

2011-09-15 Thread Don
No, not at all. Here is a trivial counterexample:

P = Q = R = 0

Don

On Sep 15, 11:46 am, abhinav gupta guptaabhinav...@gmail.com wrote:
 Shut up...its 3,,



 On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:
  It might be 3, but it doesn't have to be 3.
  Don

  On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
   if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??

   how to solve this??

  --
  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.

 --
 @ |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: Math Puzzle

2011-09-15 Thread abhinav gupta
u cnt divide a number by 0..that thing is self undrstod

On Thu, Sep 15, 2011 at 9:49 AM, Piyush Grover piyush4u.iit...@gmail.comwrote:

 Don is right

 if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!!



 On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta guptaabhinav...@gmail.com
  wrote:

 Shut up...its 3,,


 On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:

 It might be 3, but it doesn't have to be 3.
 Don

 On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
  if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??
 
  how to solve this??

 --
 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.




 --
 @ |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.


  --
 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.




-- 
@ |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: Math Puzzle

2011-09-15 Thread abhinav gupta
dude dats outside the domain of the qs...dont be oversmart.

On Thu, Sep 15, 2011 at 9:49 AM, Don dondod...@gmail.com wrote:

 No, not at all. Here is a trivial counterexample:

 P = Q = R = 0

 Don

 On Sep 15, 11:46 am, abhinav gupta guptaabhinav...@gmail.com wrote:
  Shut up...its 3,,
 
 
 
  On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:
   It might be 3, but it doesn't have to be 3.
   Don
 
   On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??
 
how to solve this??
 
   --
   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.
 
  --
  @ |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.




-- 
@ |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.



[algogeeks] Re: Math Puzzle

2011-09-15 Thread Don
Right, and in every proof above, at some point there is a possible
division by zero. Therefore the proof is not valid in cases where R or
P or Q are zero, and there are infinitely many such cases.
The problem states P+Q+R=0 as the only constraint. There are
infinitely many cases which fit that constraint where the expression
is not equal to 3.
Don

On Sep 15, 11:57 am, abhinav gupta guptaabhinav...@gmail.com wrote:
 u cnt divide a number by 0..that thing is self undrstod

 On Thu, Sep 15, 2011 at 9:49 AM, Piyush Grover 
 piyush4u.iit...@gmail.comwrote:



  Don is right

  if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!!

  On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta guptaabhinav...@gmail.com
   wrote:

  Shut up...its 3,,

  On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:

  It might be 3, but it doesn't have to be 3.
  Don

  On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
   if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??

   how to solve this??

  --
  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.

  --
  @ |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.

   --
  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.

 --
 @ |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: Math Puzzle

2011-09-15 Thread Piyush Grover
@abhinav...

it's not about being over smart or to show someone or to prove someone
anything. It's just that
you should not take any assumptions by yourself or if you do you should
specify clearly.
If u r asked this question in an interview and you give the answer 3 without
telling your assumption, u r done!!

And if you are living in the programming world, you need to take care of all
the possible scenarios otherwise u will end up throwing exceptions and
segmentation faults.


On Thu, Sep 15, 2011 at 10:32 PM, Don dondod...@gmail.com wrote:

 Right, and in every proof above, at some point there is a possible
 division by zero. Therefore the proof is not valid in cases where R or
 P or Q are zero, and there are infinitely many such cases.
 The problem states P+Q+R=0 as the only constraint. There are
 infinitely many cases which fit that constraint where the expression
 is not equal to 3.
 Don

 On Sep 15, 11:57 am, abhinav gupta guptaabhinav...@gmail.com wrote:
  u cnt divide a number by 0..that thing is self undrstod
 
  On Thu, Sep 15, 2011 at 9:49 AM, Piyush Grover 
 piyush4u.iit...@gmail.comwrote:
 
 
 
   Don is right
 
   if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!!
 
   On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta 
 guptaabhinav...@gmail.com
wrote:
 
   Shut up...its 3,,
 
   On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:
 
   It might be 3, but it doesn't have to be 3.
   Don
 
   On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com wrote:
if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??
 
how to solve this??
 
   --
   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.
 
   --
   @ |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.
 
--
   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.
 
  --
  @ |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.



-- 
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] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread vivek goel
hey ankur.

wat's eligibility criteria..
and eligible branches...
*mca* is eligible ??.

-- 
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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread vivek goel
hey nikhil,
 thanks a lot bro..

On Thu, Sep 15, 2011 at 8:10 PM, Nikhil Kumar nikhil.nsit...@gmail.comwrote:

 @vivek : If you opt for testing , you can always become a developer.It
 won't go hard on you.

 And I don't really know about consultant, you have to ask some guy in the
 force.


 On Thu, Sep 15, 2011 at 5:15 AM, sukran dhawan sukrandha...@gmail.comwrote:

 Just opt fot testing ... If there is a slot for development in the company
 they will look for the guys in testing first b4 actually going for outside
 ppl

 And u can easily shift from testing to development if u perform well


 On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma 
 rahul23111...@gmail.comwrote:

 hey guys plz tell the difference b/w testing n develp.  profile ??? n
 joing i n testing profile has growth as much as in develpoer???plz
 tell soon..?should i go in testing profile in lagre industry or in
 developer in medium scale...plz hepl

 --
 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.




 --
 Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
 B.E.( Information Technology ) ,
 NSIT Delhi , 2007-2011

  --
 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] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread abhinav gupta
y u all r worried abt MS...open up ur own cmpny...
On Thu, Sep 15, 2011 at 10:13 AM, vivek goel vivek.thapar2...@gmail.comwrote:

 hey ankur.

 wat's eligibility criteria..
 and eligible branches...
 *mca* is eligible ??.

  --
 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.




-- 
@ |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] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread rahul sharma
wich profyl is it ofering???it offers 8-9 lac for testing and 16 for
developer.i suggest to go 4 developer only n not for testing for future
growth...plz tell the profyl n package???n do tell the questions after test

On Thu, Sep 15, 2011 at 10:59 PM, abhinav gupta
guptaabhinav...@gmail.comwrote:

 y u all r worried abt MS...open up ur own cmpny...

 On Thu, Sep 15, 2011 at 10:13 AM, vivek goel 
 vivek.thapar2...@gmail.comwrote:

 hey ankur.

 wat's eligibility criteria..
 and eligible branches...
 *mca* is eligible ??.

  --
 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.




 --
 @ |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.


-- 
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] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread rahul sharma
programs will be on recursion and treesss

On Thu, Sep 15, 2011 at 11:17 PM, rahul sharma rahul23111...@gmail.comwrote:

 wich profyl is it ofering???it offers 8-9 lac for testing and 16 for
 developer.i suggest to go 4 developer only n not for testing for future
 growth...plz tell the profyl n package???n do tell the questions after test


 On Thu, Sep 15, 2011 at 10:59 PM, abhinav gupta guptaabhinav...@gmail.com
  wrote:

 y u all r worried abt MS...open up ur own cmpny...

 On Thu, Sep 15, 2011 at 10:13 AM, vivek goel 
 vivek.thapar2...@gmail.comwrote:

 hey ankur.

 wat's eligibility criteria..
 and eligible branches...
 *mca* is eligible ??.

  --
 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.




 --
 @ |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.




-- 
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] Interview Questions

2011-09-15 Thread SAMMM
#includecstdio
#includeiostream
using namespace std;

int main()
{
 int w=10;
 int *p=w;
 int *x;
 *x=1000;
 int *y;
 *y=100;
 printf(%d %d %d,*x,*p,*y);
 return 0;
}


Wht is the o/p  ??

1)1000 10 100
2)1000 10 10
3)Compilation Error
4)Run Time 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] Interview Questions

2011-09-15 Thread Bhanu Kishore
Runtime Error due to the statetment  *x = 1000;

On Thu, Sep 15, 2011 at 11:32 PM, SAMMM somnath.nit...@gmail.com wrote:

 #includecstdio
 #includeiostream
 using namespace std;

 int main()
 {
  int w=10;
  int *p=w;
  int *x;
  *x=1000;
  int *y;
  *y=100;
  printf(%d %d %d,*x,*p,*y);
  return 0;
 }


 Wht is the o/p  ??

 1)1000 10 100
 2)1000 10 10
 3)Compilation Error
 4)Run Time 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.



-- 
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] Interview Questions

2011-09-15 Thread abhinav gupta
Runtime error.. x pointing to unintialised memory..and then initialised,,,

On Thu, Sep 15, 2011 at 11:02 AM, SAMMM somnath.nit...@gmail.com wrote:

 #includecstdio
 #includeiostream
 using namespace std;

 int main()
 {
  int w=10;
  int *p=w;
  int *x;
  *x=1000;
  int *y;
  *y=100;
  printf(%d %d %d,*x,*p,*y);
  return 0;
 }


 Wht is the o/p  ??

 1)1000 10 100
 2)1000 10 10
 3)Compilation Error
 4)Run Time 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.




-- 
@ |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.



[algogeeks] MS interview

2011-09-15 Thread teja bala
13. Propose an algo/data struct for memory manager.
14. Propose and algo/data struct for timer manager.

-- 
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] Re: Interview Questions

2011-09-15 Thread SAMMM
OK Now try this ...


#includecstdio
#includeiostream
using namespace std;

int main()
{
 int w=10;
 int *p=w;
 int *x;
 *x=1000;
 printf(%d %d ,*x,*p);
 return 0;
}

Wht is the o/p  ??

1)1000 10
2)1000 100
3)Compilation Error
4)Run Time Error

Any Difference ??

-- 
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: Interview Questions

2011-09-15 Thread abhinav gupta
Runtime error

On Thu, Sep 15, 2011 at 11:16 AM, SAMMM somnath.nit...@gmail.com wrote:

 OK Now try this ...


 #includecstdio
 #includeiostream
 using namespace std;

 int main()
 {
  int w=10;
  int *p=w;
  int *x;
  *x=1000;
  printf(%d %d ,*x,*p);
  return 0;
 }

 Wht is the o/p  ??

 1)1000 10
 2)1000 100
 3)Compilation Error
 4)Run Time Error

 Any Difference ??

 --
 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.




-- 
@ |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.



[algogeeks] Re: Interview Questions

2011-09-15 Thread SAMMM
No check It once more in  G++  Compiler

-- 
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: Interview Questions

2011-09-15 Thread abhinav gupta
I dont knw man wat d hell is dis?
On Thu, Sep 15, 2011 at 11:19 AM, SAMMM somnath.nit...@gmail.com wrote:

 No check It once more in  G++  Compiler

 --
 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.




-- 
@ |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.



[algogeeks] Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread saurabh agrawal
Building a max heap takes O(n) time irrespective of the array being sorted /
unsorted.
Can someone prove that. I already know that Heap can be constucted in
o(n*log(n)) time.

-- 
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] Re: Interview Questions

2011-09-15 Thread SAMMM
I think u haven't ran the the code or compile it .. It give the output
as  1000 10 .


Check tht ..

-- 
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] Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread sunny agrawal
Read CLRS 

On Thu, Sep 15, 2011 at 11:51 PM, saurabh agrawal saurabh...@gmail.comwrote:

 Building a max heap takes O(n) time irrespective of the array being sorted
 / unsorted.
 Can someone prove that. I already know that Heap can be constucted in
 o(n*log(n)) time.

 --
 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. V 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.



[algogeeks] Re: Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread techankur
@Vivek Microsoft is open for CSE and IT department (B.Tech/M.Tech)..
The eligibility is 7 CGPA
@Rahul we don't have any information about the profile being offered,
currently just the written test is taken on 19th which would be for 1
hr, no pre placement talks nothing..
@abhinav I already own a company, but want more exposure... :) and you
know Microsoft is one of the best place to work...

Ankur

-- 
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: Interview Questions

2011-09-15 Thread vikas singh
On Thu, Sep 15, 2011 at 11:54 PM, SAMMM somnath.nit...@gmail.com wrote:

 I think u haven't ran the the code or compile it .. It give the output
 as  1000 10 .


 @SAMM : Dude, seg fault on g++


 Check tht ..

 --
 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 and Regards
VIKAS SINGH
MCA- final year
NIT DURGAPUR
email:
 vikas.singh1...@gmail.com
 shyguy1...@gmail.com
http://smrit.wordpress.com

-- 
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: Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread vivek goel
hey  ankur..
 thnaks  for ur concern..
*mca *was not eligible kya..

On Fri, Sep 16, 2011 at 12:04 AM, techankur ankurmitta...@gmail.com wrote:

 @Vivek Microsoft is open for CSE and IT department (B.Tech/M.Tech)..
 The eligibility is 7 CGPA
 @Rahul we don't have any information about the profile being offered,
 currently just the written test is taken on 19th which would be for 1
 hr, no pre placement talks nothing..
 @abhinav I already own a company, but want more exposure... :) and you
 know Microsoft is one of the best place to work...

 Ankur

 --
 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.



[algogeeks] Re: Nonuniform distribution

2011-09-15 Thread Don
Here is my solution:

For a simple case, I'll use an example with N=3 and the probability
distribution {0.25, 0.3, 0.45}.

I want my event generator to produce 0 with probability 0.25, 1 with
probability 0.3, and 2 with probability 0.45.

I build a table of size N, with each cell being divided into two parts
by a partition value:

Table Index   LeftPartition  Right
0   0 0.752
1   1 0.9  2
2   2 1.0  2

To generate an event from the desired distribution, I randomly pick
one of the three cells, and then generate a fraction on the range
0..1. If the fraction is less than that cell's partition, I return the
left value. Otherwise I return the right value.

You can verify that this results in the desired probabilities: We want
event 0 to occur with probability 0.25. Event 0 will occur when we
select cell 0 and the fraction value is less than 0.75. The
probability of that occurring is 1/3 * 3/4 = 1/4. For event 2 you have
to add up pieces from all three cells: 1/3*1/4 + 1/3*1/10 + 1/3*1 =
0.45.

Building the table is the only complicated thing that I have not yet
described. The objective is to have each event x occupying portions of
cells totaling N*px.  I start off by assigning the left part of cell x
to event x and setting the partition to N*px. Then I pair up cells
where the partition is more than one with cells where the partition is
less than one, but which don't yet have a right component. I assign
the unused part of the second cell to the event of the first cell and
subtract that amount from the partition of the first cell. If you
continue that process at most N times, you get a valid table which
will produce the desired results. To avoid having to search through
the table to find cells which have excess or can take excess (which
would make the initilization O(N^2) or even O(N^3)), I use two stacks,
one to keep track of each kind of cell.

As an optimization to the generation process above, I actually store
the partition as an integer, 2^31-1 times the value shown above. Then
I just need to compare the random integer value to that value to
determine if I will return the left event or the right event. It
avoids one division and makes the comparison an integer compare rather
than a double precision floating point compare.

I have used this in simulation applications involving hundreds or even
thousands of possible events, and it works very nicely.

Don

On Sep 14, 9:32 am, Don dondod...@gmail.com wrote:
 Given a pseudo-random generator which produces a uniform distribution
 from the range 0..2^32-1, build a generator which produces discrete
 samples from the integers 0..N-1 according to a user-specified
 probability distribution {P0, P1, P2, ... PN-1} (where Px is the
 probability of x being generated on any draw). Initialization of the
 generator may be of time complexity O(N) and the generator may have
 memory use of O(N), but each draw must be constant time O(1).

 Don

-- 
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] SPOJ PIE

2011-09-15 Thread KK
http://www.spoj.pl/problems/PIE/
I solved this using Binary Search its similar to shake shake shaky of
spoj... but still get WA :(
Plzz help...

#includeiostream
#includealgorithm
using namespace std;

bool solve(int *pie, int n, int mid,int f)
{
int sum = 0;
for (int i=0; in; i++)
sum += pie[i] / mid;

if (sum = f)
return true;
else
return false;
}

int binary_search(int *pie, int n, int f)
{
int low = 0, high = pie[n-1], mid;

while (low  high)
{
mid = low + (high - low + 1)/2;
if (solve(pie, n, mid, f))
   low = mid;
else
   high = mid - 1;
}
return low;
}

int main()
{
//freopen(input.txt, r, stdin);
//freopen(output.txt, w, stdout);

const double pi = 3.14159265358979323846264338327950;
int T;
cin  T;
while (T--)
{
int n, f, pie[10001];
cin  n  f;
for (int i=0; in; i++)
{
cin  pie[i];
pie[i] *= pie[i];
}

f++;
sort(pie, pie + n);
int largest = binary_search(pie, n, f);

//cout  largest is   largest  endl;
double ans = largest * pi;
printf(%.4lf\n, ans);
}
return 0;
}

-- 
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] SPOJ PIE

2011-09-15 Thread Gaurav Menghani
One small observation, you can use the M_PI constant already available
when you #include cmath

On Thu, Sep 15, 2011 at 3:57 PM, KK kunalkapadi...@gmail.com wrote:
 http://www.spoj.pl/problems/PIE/
 I solved this using Binary Search its similar to shake shake shaky of
 spoj... but still get WA :(
 Plzz help...

 #includeiostream
 #includealgorithm
 using namespace std;

 bool solve(int *pie, int n, int mid,int f)
 {
        int sum = 0;
        for (int i=0; in; i++)
                sum += pie[i] / mid;

        if (sum = f)
            return true;
        else
                return false;
 }

 int binary_search(int *pie, int n, int f)
 {
        int low = 0, high = pie[n-1], mid;

        while (low  high)
        {
                mid = low + (high - low + 1)/2;
                if (solve(pie, n, mid, f))
                   low = mid;
                else
                   high = mid - 1;
        }
        return low;
 }

 int main()
 {
    //freopen(input.txt, r, stdin);
    //freopen(output.txt, w, stdout);

        const double pi = 3.14159265358979323846264338327950;
        int T;
        cin  T;
        while (T--)
        {
                int n, f, pie[10001];
                cin  n  f;
                for (int i=0; in; i++)
                {
                    cin  pie[i];
                    pie[i] *= pie[i];
                }

                f++;
                sort(pie, pie + n);
                int largest = binary_search(pie, n, f);

                //cout  largest is   largest  endl;
                double ans = largest * pi;
                printf(%.4lf\n, ans);
        }
        return 0;
 }

 --
 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.





-- 
Gaurav Menghani

-- 
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] Party Lamps

2011-09-15 Thread Blackwizard
Hi
I want to solve this problem but I'm not sure about the algorithm...
I think It can be complete search...
Is the anybody to help me?
what's the algorithm for this question...

Problem Link:
http://olympiads.win.tue.nl/ioi/ioi98/contest/day1/party/party.html


Thank's

-- 
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] Party Lamps

2011-09-15 Thread Gaurav Menghani
On Thu, Sep 15, 2011 at 4:44 PM, Blackwizard
mohammadreza.rahman...@gmail.com wrote:
 Hi
 I want to solve this problem but I'm not sure about the algorithm...
 I think It can be complete search...
 Is the anybody to help me?
 what's the algorithm for this question...

 Problem Link:
 http://olympiads.win.tue.nl/ioi/ioi98/contest/day1/party/party.html

I think BFS should work, but then some pruning would be required since
the number of lamps is large. I'm not sure how the pruning would be
done though.



 Thank's

 --
 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.





-- 
Gaurav Menghani

-- 
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] Re: Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread techankur
PEC main mca hai hi nahin :P khaali B.E and M.E hai and from this year
they have started M.Sc

Ankur

On Sep 15, 11:41 pm, vivek goel vivek.thapar2...@gmail.com wrote:
 hey  ankur..
  thnaks  for ur concern..
 *mca *was not eligible kya..







 On Fri, Sep 16, 2011 at 12:04 AM, techankur ankurmitta...@gmail.com wrote:
  @Vivek Microsoft is open for CSE and IT department (B.Tech/M.Tech)..
  The eligibility is 7 CGPA
  @Rahul we don't have any information about the profile being offered,
  currently just the written test is taken on 19th which would be for 1
  hr, no pre placement talks nothing..
  @abhinav I already own a company, but want more exposure... :) and you
  know Microsoft is one of the best place to work...

  Ankur

  --
  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.



[algogeeks] An interesting question

2011-09-15 Thread DeVaNsH gUpTa
Write a program that can be compiled on gcc but not on g++ or vice-versa?

-- 
Thanks and Regards
*Devansh Gupta*
*B.Tech Third Year*
*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 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: Interview Questions

2011-09-15 Thread Deoki Nandan
error due statement int*y; because it tries to allocate another pointer
being uninitialized .It may happen that garbage address which was given to x
is also try to give to y . This makes program crash ...
You can check it by making *y=1000; sttmnt as comment and run after that
comment both statement int*y; and *y=1000; . You will see what happen.

On 16 September 2011 00:07, vikas singh shyguy1...@gmail.com wrote:



 On Thu, Sep 15, 2011 at 11:54 PM, SAMMM somnath.nit...@gmail.com wrote:

 I think u haven't ran the the code or compile it .. It give the output
 as  1000 10 .


 @SAMM : Dude, seg fault on g++


 Check tht ..

 --
 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 and Regards
 VIKAS SINGH
 MCA- final year
 NIT DURGAPUR
 email:
  vikas.singh1...@gmail.com
  shyguy1...@gmail.com
 http://smrit.wordpress.com


  --
 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.




-- 
**With Regards
Deoki Nandan Vishwakarma

*
*

-- 
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] Party Lamps

2011-09-15 Thread Marcelo Amorim Menegali
Notice that changing the order of button presses doesn't change anything.
Notice also that pressing a button twice is the same as not pressing it.
So, in the end, given N, there are at most 2^4 = 16 final configurations
(each button is either pressed once or not).

I hope this will help you.

--
Marcelo

On Thu, Sep 15, 2011 at 6:45 PM, Gaurav Menghani
gaurav.mengh...@gmail.comwrote:

 On Thu, Sep 15, 2011 at 4:44 PM, Blackwizard
 mohammadreza.rahman...@gmail.com wrote:
  Hi
  I want to solve this problem but I'm not sure about the algorithm...
  I think It can be complete search...
  Is the anybody to help me?
  what's the algorithm for this question...
 
  Problem Link:
  http://olympiads.win.tue.nl/ioi/ioi98/contest/day1/party/party.html

 I think BFS should work, but then some pruning would be required since
 the number of lamps is large. I'm not sure how the pruning would be
 done though.

 
 
  Thank's
 
  --
  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.
 
 



 --
 Gaurav Menghani

 --
 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] An interesting question

2011-09-15 Thread saurabh singh
1st case
http://ideone.com/mLd8U *On g++*
*http://ideone.com/Zg7EF on gcc
*
2nd case
http://ideone.com/PgnvE On g++
http://ideone.com/MXGNu On gcc

On Fri, Sep 16, 2011 at 3:42 AM, DeVaNsH gUpTa devanshgupta...@gmail.comwrote:

 Write a program that can be compiled on gcc but not on g++ or vice-versa?

 --
 Thanks and Regards
 *Devansh Gupta*
 *B.Tech Third Year*
 *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 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.




-- 
Saurabh Singh
B.Tech (Computer Science)
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 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] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread Sandy
Lots of guys already have shared interesting facts.

Here is a good saying - Knowing that a bottle of COKE will burst like a
fountain if opened after shaking.  Someone who tries that to validate it has
a Testing DNA

Here are some more differences that can help you make choices :)

Developer:
1.  Works towards clear cut requirements and implements that in
most-efficient manner.
2.  Language is fixed - If the product is being developed in C++ that's the
only language you use (Limited by limitations of language).
3.  Least Creative until unless you work as a UI Developer on an appealing
UI product (e.g. Apple iPAD, Windows Phone, Windows 8).
4.  As number of years grow in that role, You Build Depth in one area.

SDET:
1.  Validates that implementation meets the requirements as well as is the
most-efficient by Writing Automated Tests/Tools that can validate that.
(Best example to think is how does Google Search Engine get tested, How
Microsoft tests Excel, How Visual Studio is tested) - These are softwares
that demand SMART ways of testing, Not boring ways of running some tests
manually.  Which tells why they want SDETs and not Testers.

2.  Choose whatever language suits your needs (Scripting, C++, C#,
Powershell, Perl etc).
3.  Build Breadth in Many Areas (Depth in areas you like the most).
4.  Creative:  Testing demands creativity, Think about customers and come up
with interesting scenarios in which customers will use the product.

Apart from these definitions a lot depends on the team you join and the kind
of work it does.  You will find Un-Satisfied Developers as well as Testers.


On Thu, Sep 15, 2011 at 10:47 PM, vivek goel vivek.thapar2...@gmail.comwrote:

 hey nikhil,
  thanks a lot bro..


 On Thu, Sep 15, 2011 at 8:10 PM, Nikhil Kumar nikhil.nsit...@gmail.comwrote:

 @vivek : If you opt for testing , you can always become a developer.It
 won't go hard on you.

 And I don't really know about consultant, you have to ask some guy in the
 force.


 On Thu, Sep 15, 2011 at 5:15 AM, sukran dhawan sukrandha...@gmail.comwrote:

 Just opt fot testing ... If there is a slot for development in the
 company they will look for the guys in testing first b4 actually going for
 outside ppl

 And u can easily shift from testing to development if u perform well


 On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma 
 rahul23111...@gmail.comwrote:

 hey guys plz tell the difference b/w testing n develp.  profile ??? n
 joing i n testing profile has growth as much as in develpoer???plz
 tell soon..?should i go in testing profile in lagre industry or in
 developer in medium scale...plz hepl

 --
 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.




 --
 Nikhil Kumar , Software Engineer @ Ciena Gurgaon.
 B.E.( Information Technology ) ,
 NSIT Delhi , 2007-2011

  --
 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.




-- 

*Sandeep Kumar,*
 ( Mobile +91-9866507368

*“I believe in smart work, Believe Me”*

-- 
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] Party Lamps

2011-09-15 Thread Mohammad Reza Rahmani
just 2^4??? why???
we have 4^1 states and it's about 10^6000...This value is very big
to perform complete search...Is it True?

thank's

On 9/16/11, Marcelo Amorim Menegali mmeneg...@gmail.com wrote:
 Notice that changing the order of button presses doesn't change anything.
 Notice also that pressing a button twice is the same as not pressing it.
 So, in the end, given N, there are at most 2^4 = 16 final configurations
 (each button is either pressed once or not).

 I hope this will help you.

 --
 Marcelo

 On Thu, Sep 15, 2011 at 6:45 PM, Gaurav Menghani
 gaurav.mengh...@gmail.comwrote:

 On Thu, Sep 15, 2011 at 4:44 PM, Blackwizard
 mohammadreza.rahman...@gmail.com wrote:
  Hi
  I want to solve this problem but I'm not sure about the algorithm...
  I think It can be complete search...
  Is the anybody to help me?
  what's the algorithm for this question...
 
  Problem Link:
  http://olympiads.win.tue.nl/ioi/ioi98/contest/day1/party/party.html

 I think BFS should work, but then some pruning would be required since
 the number of lamps is large. I'm not sure how the pruning would be
 done though.

 
 
  Thank's
 
  --
  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.
 
 



 --
 Gaurav Menghani

 --
 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] Re: Math Puzzle

2011-09-15 Thread Ashima .
solution is =3 with the condition p!=0 and q!=0 and r!=0
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan




On Thu, Sep 15, 2011 at 10:38 PM, Piyush Grover
piyush4u.iit...@gmail.comwrote:

 @abhinav...

 it's not about being over smart or to show someone or to prove someone
 anything. It's just that
 you should not take any assumptions by yourself or if you do you should
 specify clearly.
 If u r asked this question in an interview and you give the answer 3
 without telling your assumption, u r done!!

 And if you are living in the programming world, you need to take care of
 all the possible scenarios otherwise u will end up throwing exceptions and
 segmentation faults.



 On Thu, Sep 15, 2011 at 10:32 PM, Don dondod...@gmail.com wrote:

 Right, and in every proof above, at some point there is a possible
 division by zero. Therefore the proof is not valid in cases where R or
 P or Q are zero, and there are infinitely many such cases.
 The problem states P+Q+R=0 as the only constraint. There are
 infinitely many cases which fit that constraint where the expression
 is not equal to 3.
 Don

 On Sep 15, 11:57 am, abhinav gupta guptaabhinav...@gmail.com wrote:
  u cnt divide a number by 0..that thing is self undrstod
 
  On Thu, Sep 15, 2011 at 9:49 AM, Piyush Grover 
 piyush4u.iit...@gmail.comwrote:
 
 
 
   Don is right
 
   if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!!
 
   On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta 
 guptaabhinav...@gmail.com
wrote:
 
   Shut up...its 3,,
 
   On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:
 
   It might be 3, but it doesn't have to be 3.
   Don
 
   On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN naga4...@gmail.com
 wrote:
if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ??
 
how to solve this??
 
   --
   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.
 
   --
   @ |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.
 
--
   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.
 
  --
  @ |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.


  --
 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.



[algogeeks] Re: Party Lamps

2011-09-15 Thread Don
Notice that every sixth lamp will always be in the same state. If you
know the state of any 6 adjacent lamps you know the state of all
lamps.
In addition, you just need to know if a certain button has been pushed
an even number of times or an odd number. Which even or odd number
does not matter, and the order of the button presses does not matter.
Don

On Sep 15, 10:26 pm, Mohammad Reza Rahmani
mohammadreza.rahman...@gmail.com wrote:
 just 2^4??? why???
 we have 4^1 states and it's about 10^6000...This value is very big
 to perform complete search...Is it True?

 thank's

 On 9/16/11, Marcelo Amorim Menegali mmeneg...@gmail.com wrote:







  Notice that changing the order of button presses doesn't change anything.
  Notice also that pressing a button twice is the same as not pressing it.
  So, in the end, given N, there are at most 2^4 = 16 final configurations
  (each button is either pressed once or not).

  I hope this will help you.

  --
  Marcelo

  On Thu, Sep 15, 2011 at 6:45 PM, Gaurav Menghani
  gaurav.mengh...@gmail.comwrote:

  On Thu, Sep 15, 2011 at 4:44 PM, Blackwizard
  mohammadreza.rahman...@gmail.com wrote:
   Hi
   I want to solve this problem but I'm not sure about the algorithm...
   I think It can be complete search...
   Is the anybody to help me?
   what's the algorithm for this question...

   Problem Link:
  http://olympiads.win.tue.nl/ioi/ioi98/contest/day1/party/party.html

  I think BFS should work, but then some pruning would be required since
  the number of lamps is large. I'm not sure how the pruning would be
  done though.

   Thank's

   --
   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.

  --
  Gaurav Menghani

  --
  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] Interview Questions

2011-09-15 Thread sukran dhawan
run time error because pointer is not assigned a address and it will be
pointing to some junk location
so *x = 1000 will result in a run time error

On Thu, Sep 15, 2011 at 11:32 PM, SAMMM somnath.nit...@gmail.com wrote:

 #includecstdio
 #includeiostream
 using namespace std;

 int main()
 {
  int w=10;
  int *p=w;
  int *x;
  *x=1000;
  int *y;
  *y=100;
  printf(%d %d %d,*x,*p,*y);
  return 0;
 }


 Wht is the o/p  ??

 1)1000 10 100
 2)1000 10 10
 3)Compilation Error
 4)Run Time 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.



-- 
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: Interview Questions

2011-09-15 Thread Rohit Upadhyaya
Try This 1-:

#includestdio.h
#includestdlib.h
int main()
{
 int w=10;
 int *p=w;
 int *x;
x=(int *)malloc(sizeof(int)*1);
 *x=1000;
 int *y;
y=(int *)malloc(sizeof(int));
 *y=100;
 printf(%d %d %d,*x,*p,*y);
 return 0;
}

-- 
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] Re: Interview Questions

2011-09-15 Thread Ankuj Gupta
It is still giving run time error

On Sep 16, 4:40 am, Deoki Nandan deok...@gmail.com wrote:
 error due statement int*y; because it tries to allocate another pointer
 being uninitialized .It may happen that garbage address which was given to x
 is also try to give to y . This makes program crash ...
 You can check it by making *y=1000; sttmnt as comment and run after that
 comment both statement int*y; and *y=1000; . You will see what happen.

 On 16 September 2011 00:07, vikas singh shyguy1...@gmail.com wrote:











  On Thu, Sep 15, 2011 at 11:54 PM, SAMMM somnath.nit...@gmail.com wrote:

  I think u haven't ran the the code or compile it .. It give the output
  as  1000 10 .

  @SAMM : Dude, seg fault on g++

  Check tht ..

  --
  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 and Regards
  VIKAS SINGH
  MCA- final year
  NIT DURGAPUR
  email:
   vikas.singh1...@gmail.com
   shyguy1...@gmail.com
 http://smrit.wordpress.com

   --
  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.

 --
 **With Regards
 Deoki Nandan Vishwakarma

 *
 *

-- 
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++ Query...

2011-09-15 Thread siddharam suresh
i saw better solution in stack over flow, but these things violates the
Memory rules of C++
Thank you,
Sid.



On Thu, Sep 15, 2011 at 6:41 PM, teja bala pawanjalsa.t...@gmail.comwrote:

 @ BHARATH

 exactly very thx


 On Thu, Sep 15, 2011 at 5:22 PM, bharatkumar bagana 
 bagana.bharatku...@gmail.com wrote:

 @teja : r u looking for something like this...
 #includestdio.h
 #includestdlib.h
 class Hai
 {
  public :
 int* getPointerToPrivate()
 {
 return i;
 }
 void setI(int j)
 {
 i=j;
 }
  private:
 int i;
 };
 main()
 {
  Hai h;
  h.setI(10);
  int *i=h.getPointerToPrivate();
  printf(%d,*i);

 }

 On Thu, Sep 15, 2011 at 6:41 AM, teja bala pawanjalsa.t...@gmail.comwrote:

 How to access class private data members with a pointer?

 thx 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.




 --

 **Please do not print this e-mail until urgent requirement. Go Green!!
 Save Papers = Save Trees
 *BharatKumar Bagana*
 **http://www.google.com/profiles/bagana.bharatkumarhttp://www.google.com/profiles/bagana.bharatkumar
 *
 Mobile +91 8056127652*
 bagana.bharatku...@gmail.com


  --
 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.



[algogeeks] Re: Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread Ankuj Gupta
is talks of more tighter bound of O(nlogn)

On Sep 15, 11:24 pm, sunny agrawal sunny816.i...@gmail.com wrote:
 Read CLRS 

 On Thu, Sep 15, 2011 at 11:51 PM, saurabh agrawal saurabh...@gmail.comwrote:

  Building a max heap takes O(n) time irrespective of the array being sorted
  / unsorted.
  Can someone prove that. I already know that Heap can be constucted in
  o(n*log(n)) time.

  --
  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. V 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.



Re: [algogeeks] Re: Party Lamps

2011-09-15 Thread Mohammad Reza Rahmani
I did'nt exactly what you say
why 6 adjacent lamps
it just depend on the buttons not on lamps...

you just need to know if a certain button has been pushed... you're
true...and it has 4^10...is it right?

why 2^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] Re: Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread Terence

http://en.wikipedia.org/wiki/Binary_heap#Building_a_heap
The algorithm of heap-building presented in most books is O(n).

On 2011-9-16 12:52, Ankuj Gupta wrote:

is talks of more tighter bound of O(nlogn)

On Sep 15, 11:24 pm, sunny agrawalsunny816.i...@gmail.com  wrote:

Read CLRS 

On Thu, Sep 15, 2011 at 11:51 PM, saurabh agrawalsaurabh...@gmail.comwrote:


Building a max heap takes O(n) time irrespective of the array being sorted
/ unsorted.
Can someone prove that. I already know that Heap can be constucted in
o(n*log(n)) time.
--
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. V 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.



Re: [algogeeks] Re: Party Lamps

2011-09-15 Thread Mohammad Reza Rahmani
No body else can solve my problem???

-- 
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.