Re: [algogeeks] Re: another google telephone interview question

2010-05-25 Thread liu yan
I think you don't need to use the median number as pivot. As long as you use
different number to do partition, after log(k) times recursive, the N
element will be sorted.

On Sun, May 23, 2010 at 3:17 PM, Jagadish M jagadis...@gmail.com wrote:

  Further to my previous post, one question.
  Can the median be found in O(n) time without using extra memory?
  I am not familiar with the algorithms that find the median though I
  know the
  median can be found in O(n) time.
 

 This is important! I don't see how the standard algorithm for median
 finding can be tweaked to use only constant extra space.

 @Bharath: It's a nice algorithm, nevertheless :)


 -Jagadish
 http://www.cse.iitb.ac.in/~jagadishhttp://www.cse.iitb.ac.in/%7Ejagadish


 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algoge...@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Liu Yan

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algoge...@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: puzzle any answers

2009-07-02 Thread liu yan
Why Linda cannot be the Winner? Amy could be the second and Cindy is the
third one.

Thanks

Liu Yan

On Wed, Jul 1, 2009 at 12:52 AM, Ankit Gupta talk2anki...@gmail.com wrote:

 Cindy is Musician
 Thanks  Regards:
 Ankit Gupta
 B.Tech Final Year IT
 NIT,Allahabad
 Mob-+91-9369309343



 On Wed, Jul 1, 2009 at 1:14 PM, AKS abhijeet.k.s...@gmail.com wrote:


 Three beauty pageant finalists-Cindy, Amy and Linda-The winner was
 musician. The one who was not last or first was a math major. The one
 who came in third had black hair. Linda had red hair. Amy had no
 musical abilities. Who was first?
 (A) Cindy (B) Amy (C) Linda (D) None of these



 



-- 
Liu Yan

--~--~-~--~~~---~--~~
You received this 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
-~--~~~~--~~--~--~---