[algogeeks] Re: yahoo question

2011-09-21 Thread abhishek
DCE
i am also want to know recruitment process as it is coming on 23rd.

On Sep 21, 7:52 pm, Simran Singh sammy.4...@gmail.com wrote:
 Hey.. Which college you from..?? And please do tell more about their
 process..









 On Wed, Sep 21, 2011 at 7:31 PM, abhishek abhishek.ma...@gmail.com wrote:
  You have given a number 123456789 and two opearators + and *. You can
  use this two operators as many times u want. But you cant change the
  sequence of the number given there. The evaluated value is 2097.

  e.g. 1+2+345*6+7+8+9=2097

  You have to find all the such expressions that evaluates and value is
  equal to the given value. You can use concatenation of numbers like
  345 is concatenated there.

  Please remember that You have to find all Such expressions. And write
  C/C++/Java code for that

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

 --
 Simran Singh
 Under Graduate student,
 Computer Engineering,
 Netaji Subhas Institute Of Technology,
 Dwarka Sec-3, Delhi-78
 (M): +91-9811699512

-- 
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: yahoo question

2011-09-21 Thread Simran Singh
http://stackoverflow.com/questions/4573744/modify-a-given-number-to-find-the-required-sum/4573881#4573881
for
solution.. And please do share all the info you gather about the process..

On Wed, Sep 21, 2011 at 9:31 PM, abhishek abhishek.ma...@gmail.com wrote:

 DCE
 i am also want to know recruitment process as it is coming on 23rd.

 On Sep 21, 7:52 pm, Simran Singh sammy.4...@gmail.com wrote:
  Hey.. Which college you from..?? And please do tell more about their
  process..
 
 
 
 
 
 
 
 
 
  On Wed, Sep 21, 2011 at 7:31 PM, abhishek abhishek.ma...@gmail.com
 wrote:
   You have given a number 123456789 and two opearators + and *. You can
   use this two operators as many times u want. But you cant change the
   sequence of the number given there. The evaluated value is 2097.
 
   e.g. 1+2+345*6+7+8+9=2097
 
   You have to find all the such expressions that evaluates and value is
   equal to the given value. You can use concatenation of numbers like
   345 is concatenated there.
 
   Please remember that You have to find all Such expressions. And write
   C/C++/Java code for that
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
   algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
  Simran Singh
  Under Graduate student,
  Computer Engineering,
  Netaji Subhas Institute Of Technology,
  Dwarka Sec-3, Delhi-78
  (M): +91-9811699512

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




-- 
Simran Singh
Under Graduate student,
Computer Engineering,
Netaji Subhas Institute Of Technology,
Dwarka Sec-3, Delhi-78
(M): +91-9811699512

-- 
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: Yahoo Question

2011-07-12 Thread Abhi
Can anyone give an insight into the way XOR operations are used for swapping 
two variables?

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/ZJ_fiB6VmlQJ.
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: Yahoo Question

2011-07-12 Thread atul purohit
@abhi For XOR
a=a^b;
b=a^b;
a=a^b;


On Tue, Jul 12, 2011 at 4:26 PM, Abhi abhi123khat...@gmail.com wrote:

 Can anyone give an insight into the way XOR operations are used for
 swapping two variables?

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ZJ_fiB6VmlQJ.

 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.




-- 

Atul Purohit

-- 
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: Yahoo Question

2011-07-11 Thread sachin sharma
@vaibhav

Overflow problem in case of big number in option b.
the best and simple one is option a.

Best Wishes
Sachin Sharma | Software Trainee | Information Mosaic
New York | Dublin | London | Luxembourg | New Delhi | Singapore | Melbourne
|
e-mail: sachinku...@informationmosaic.com
Web:www.informationmosaic.comhttp://www.informationmosaic.com/ |  t:
www.twitter.com/infomosaic
Winner 2009 Banking Technology Readers' Choice Award for Best Corporate
Actions Automation Solution

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

2011-07-11 Thread Sandeep Jain
Option A: Works on all data types
Option B: Works on numerical data, (best on integral data) but leads to
overflow problem
Option C: XOR would solve the problem of overflow, but afaik bitwise
operators work on integral data


Regards,
Sandeep Jain



On Mon, Jul 11, 2011 at 12:03 PM, sachin sharma sachin.bles...@gmail.comwrote:


 @vaibhav

 Overflow problem in case of big number in option b.
 the best and simple one is option a.

 Best Wishes
 Sachin Sharma | Software Trainee | Information Mosaic
 New York | Dublin | London | Luxembourg | New Delhi | Singapore | Melbourne
 |
 e-mail: sachinku...@informationmosaic.com
 Web:www.informationmosaic.comhttp://www.informationmosaic.com/ |  t:
 www.twitter.com/infomosaic
 Winner 2009 Banking Technology Readers' Choice Award for Best Corporate
 Actions Automation Solution

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

2011-07-11 Thread aditya pratap
only first is conditionally independent and other options are used with some
conditions thats why always first one is preferable.

On Mon, Jul 11, 2011 at 12:03 PM, sachin sharma sachin.bles...@gmail.comwrote:


 @vaibhav

 Overflow problem in case of big number in option b.
 the best and simple one is option a.

 Best Wishes
 Sachin Sharma | Software Trainee | Information Mosaic
 New York | Dublin | London | Luxembourg | New Delhi | Singapore | Melbourne
 |
 e-mail: sachinku...@informationmosaic.com
 Web:www.informationmosaic.comhttp://www.informationmosaic.com/ |  t:
 www.twitter.com/infomosaic
 Winner 2009 Banking Technology Readers' Choice Award for Best Corporate
 Actions Automation Solution

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@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
Aditya Pratap
MCA II

-- 
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: Yahoo Question

2011-07-11 Thread aditya pratap
thanks sandeep sir

On Mon, Jul 11, 2011 at 12:16 PM, aditya pratap contacttoadity...@gmail.com
 wrote:

 only first is conditionally independent and other options are used with
 some conditions thats why always first one is preferable.

 On Mon, Jul 11, 2011 at 12:03 PM, sachin sharma 
 sachin.bles...@gmail.comwrote:


 @vaibhav

 Overflow problem in case of big number in option b.
 the best and simple one is option a.

 Best Wishes
 Sachin Sharma | Software Trainee | Information Mosaic
 New York | Dublin | London | Luxembourg | New Delhi | Singapore |
 Melbourne |
 e-mail: sachinku...@informationmosaic.com
 Web:www.informationmosaic.comhttp://www.informationmosaic.com/ |  t:
 www.twitter.com/infomosaic
 Winner 2009 Banking Technology Readers' Choice Award for Best Corporate
 Actions Automation Solution

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@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
 Aditya Pratap
 MCA II




-- 
Regards
Aditya Pratap
MCA II

-- 
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: Yahoo Question

2011-07-11 Thread raj singh
1.using temporary variable method is the best as it is applicable to all
datatype.

2.using airthmatic expresion:-  problem arise if we r swap the value using
pointer and both pointer point to same location
   let  int *x and int *y both point to a=20;
   now we write a method swap
  void swap(int *x,int *y)
  {
 *x=*x+*y;  //20+20=40
 *y=*x-*y;  //40-40=0;
  *x=*x-*y;// 0-0=0
  }

In this case this method fail since x and y both point to a=20;and result
become 0;

3.same problem arise in bitwise xor opertor.

-- 
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: Yahoo Question

2011-07-10 Thread Dave
@Vaibhav: Your method b doesn't work for floating point numbers
because they have finite precision. E.g.,as an extreme example, try it
on a = 1 and b = 1d-25. When you form a+b, the result is 1, not 1 +
1d-25. Then 1 - 1d-25 gives 1 (which is correct), and 1 - 1 = 0. The
latter should be 1d-25, so you have a total loss of precision in that
number. More common would be just a partial loss of precision.

Dave

On Jul 10, 3:55 pm, vaibhav shukla vaibhav200...@gmail.com wrote:
 On Mon, Jul 11, 2011 at 1:51 AM, aanchal goyal 
 goyal.aanch...@gmail.comwrote:

  These are the various ways to swap 2 variables
  a) Using temporary Variable

        always inefficient. using extra memory.

  b) Usnig some Arithmentic operation

        works for all numbers even floating points
       a and b are two no. to swap : a=a+b;
                                                  b=a-b;
                                                   a=a-b;
    always works

  c) Using bitwise XOR operation

    since bitwise results an error in floating point numbers so this method
 also fails.
  hence (b) is better among the three.what say ?



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

 --
   best wishes!!
 Vaibhav Shukla
     DU-MCA

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To 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: Yahoo Question

2011-07-10 Thread Piyush Sinha
using a temp variable is considered to be the best option..

On 7/11/11, Dave dave_and_da...@juno.com wrote:
 @Vaibhav: Your method b doesn't work for floating point numbers
 because they have finite precision. E.g.,as an extreme example, try it
 on a = 1 and b = 1d-25. When you form a+b, the result is 1, not 1 +
 1d-25. Then 1 - 1d-25 gives 1 (which is correct), and 1 - 1 = 0. The
 latter should be 1d-25, so you have a total loss of precision in that
 number. More common would be just a partial loss of precision.

 Dave

 On Jul 10, 3:55 pm, vaibhav shukla vaibhav200...@gmail.com wrote:
 On Mon, Jul 11, 2011 at 1:51 AM, aanchal goyal
 goyal.aanch...@gmail.comwrote:

  These are the various ways to swap 2 variables
  a) Using temporary Variable

        always inefficient. using extra memory.

  b) Usnig some Arithmentic operation

        works for all numbers even floating points
       a and b are two no. to swap : a=a+b;
                                                  b=a-b;
                                                   a=a-b;
    always works

  c) Using bitwise XOR operation

    since bitwise results an error in floating point numbers so this method
 also fails.
  hence (b) is better among the three.what say ?



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

 --
   best wishes!!
 Vaibhav Shukla
     DU-MCA

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To 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.




-- 
*Piyush Sinha*
*IIIT, Allahabad*
*+91-8792136657*
*+91-7483122727*
*https://www.facebook.com/profile.php?id=10655377926 *

-- 
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: Yahoo Question

2011-06-30 Thread pacific :-)
Oh I got it.
If ( interview at google)
{
   Map reduce
} else if(interview at yahoo) {
   Hadoop
} else {
   Your personal preference.
}

On Thu, Jun 30, 2011 at 4:02 AM, bittu shashank7andr...@gmail.com wrote:

 1.Use Haddop  Map Reduce Framework .Obviously We Need Distributed
 Algo  we will make one computer as master  assign the job to all
   slave computer to do the crawling the web depending upon the
 geographic area ( m thinking real time problem).to crawled the
 maximum
   pages in least time we need above framework or any other
 distributed framework like google map reduce or GFS.
   computers are given for maximizing the crawling function 
 minimizing the the crawling time time..

   Algorithmically you ca think of its like a graph which has 100
 connected components in it we will bfs to traverse each computer to
 find out
   the number of pages it has been crawled  till now.

  i have given some overview hope it will help


 Thanks
 Shashank I Don't Do Code to Code But I Do Code to Build Product
 Computer Science  Engineering
 Birla Institute of Technology,Mesra

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

-- 
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: Yahoo Question

2011-06-29 Thread bittu
1.Use Haddop  Map Reduce Framework .Obviously We Need Distributed
Algo  we will make one computer as master  assign the job to all
   slave computer to do the crawling the web depending upon the
geographic area ( m thinking real time problem).to crawled the
maximum
   pages in least time we need above framework or any other
distributed framework like google map reduce or GFS.
   computers are given for maximizing the crawling function 
minimizing the the crawling time time..

   Algorithmically you ca think of its like a graph which has 100
connected components in it we will bfs to traverse each computer to
find out
   the number of pages it has been crawled  till now.

  i have given some overview hope it will help


Thanks
Shashank I Don't Do Code to Code But I Do Code to Build Product
Computer Science  Engineering
Birla Institute of Technology,Mesra

-- 
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: Yahoo Question

2011-06-28 Thread Priyanshu
lol... unfortunately i gave the same answer, and they told me to try my luck
at google..


Regards,
Priyanshu Gupta



On Tue, Jun 28, 2011 at 10:42 AM, pacific :-) pacific4...@gmail.com wrote:

 Brin and Larry would be the best people to answer this question.


 On Tue, Jun 28, 2011 at 12:10 AM, priyanshu priyanshuro...@gmail.comwrote:

 anyone!!!

 On Jun 23, 3:28 pm, Priyanshu priyanshuro...@gmail.com wrote:
  You have 100 computers, connected with each other. Give the most
 efficient
  way to design a web crawler, which will crawl most pages in least amount
 of
  time.
 
  Thanks,
  Priyanshu.

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

  --
 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: Yahoo Question

2011-06-28 Thread vamsi achyuth
:))

On 28 June 2011 23:27, Priyanshu priyanshuro...@gmail.com wrote:

 lol... unfortunately i gave the same answer, and they told me to try my
 luck at google..


 Regards,
 Priyanshu Gupta



 On Tue, Jun 28, 2011 at 10:42 AM, pacific :-) pacific4...@gmail.comwrote:

 Brin and Larry would be the best people to answer this question.


 On Tue, Jun 28, 2011 at 12:10 AM, priyanshu priyanshuro...@gmail.comwrote:

 anyone!!!

 On Jun 23, 3:28 pm, Priyanshu priyanshuro...@gmail.com wrote:
  You have 100 computers, connected with each other. Give the most
 efficient
  way to design a web crawler, which will crawl most pages in least
 amount of
  time.
 
  Thanks,
  Priyanshu.

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

  --
 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: Yahoo Question

2011-06-27 Thread priyanshu
anyone!!!

On Jun 23, 3:28 pm, Priyanshu priyanshuro...@gmail.com wrote:
 You have 100 computers, connected with each other. Give the most efficient
 way to design a web crawler, which will crawl most pages in least amount of
 time.

 Thanks,
 Priyanshu.

-- 
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: Yahoo Question

2010-09-18 Thread Krunal Modi
@umesh kewat :

In worst case it will be O(nk) in case of your solution.

check for this case:
01-06-11-16
02-07-12-17
03-08-13-18
04-09-14-19
05-10-15-20
--
Krunal

-- 
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: Yahoo Question

2010-09-18 Thread Krunal Modi
@umesh kewat:

In worst case it will be O(n*k), by your solution.

01-06-11-16
02-07-12-17
03-08-13-18
04-09-14-19
05-10-15-20
--
Krunal


By umesh kewat:
Create binary search tree using n nodes of K list den do in-order and
make a
single list

-- 
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: Yahoo Question

2010-09-17 Thread vikas kumar
@Bittu
I am confused about one point you need to process atleast n*k
elements so how will you do it in nlogk time. It seems really
tricky if possible.it's min time should be O(nk). correct me if I
am wrong.

On Sep 17, 6:34 am, tkcn tkcna...@gmail.com wrote:
 Use k-way merging +1.

 1. Before the merging start, sorting these lists according to the
 first element of each list.  // O(k log k)
 2. So the first element in the first list is the smallest element. Put
 the smallest into the result array. // O(1)
 3. Then, using binary search to find the new position of the first
 list  // O(k)
 4. These lists are still sorted, so the first element in the first
 list is still smallest. Just repeat the step 2, 3 n times.

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



Re: [algogeeks] Re: Yahoo Question

2010-09-17 Thread umesh kewat
Create binary search tree using n nodes of K list den do in-order and make a
single list

On Fri, Sep 17, 2010 at 12:58 PM, vikas kumar vikas.kumar...@gmail.comwrote:

 @Bittu
 I am confused about one point you need to process atleast n*k
 elements so how will you do it in nlogk time. It seems really
 tricky if possible.it's min time should be O(nk). correct me if I
 am wrong.

 On Sep 17, 6:34 am, tkcn tkcna...@gmail.com wrote:
  Use k-way merging +1.
 
  1. Before the merging start, sorting these lists according to the
  first element of each list.  // O(k log k)
  2. So the first element in the first list is the smallest element. Put
  the smallest into the result array. // O(1)
  3. Then, using binary search to find the new position of the first
  list  // O(k)
  4. These lists are still sorted, so the first element in the first
  list is still smallest. Just repeat the step 2, 3 n times.

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




-- 
Thanks  Regards

Umesh kewat

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



Re: [algogeeks] Re: Yahoo Question

2010-09-17 Thread Nikhil Jindal
@vikas: Total number of elements are not n*k. Total number of elements are
n, which are divided into k lists.

@Rahul Singal: +1 for ur answer.

On Fri, Sep 17, 2010 at 12:58 PM, vikas kumar vikas.kumar...@gmail.comwrote:

 @Bittu
 I am confused about one point you need to process atleast n*k
 elements so how will you do it in nlogk time. It seems really
 tricky if possible.it's min time should be O(nk). correct me if I
 am wrong.

 On Sep 17, 6:34 am, tkcn tkcna...@gmail.com wrote:
  Use k-way merging +1.
 
  1. Before the merging start, sorting these lists according to the
  first element of each list.  // O(k log k)
  2. So the first element in the first list is the smallest element. Put
  the smallest into the result array. // O(1)
  3. Then, using binary search to find the new position of the first
  list  // O(k)
  4. These lists are still sorted, so the first element in the first
  list is still smallest. Just repeat the step 2, 3 n times.

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



Please access the attached hyperlink for an important electronic communications 
disclaimer: http://dce.edu/web/Sections/Standalone/Email_Disclaimer.php

-- 
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: Yahoo Question

2010-09-16 Thread tkcn
Use k-way merging +1.

1. Before the merging start, sorting these lists according to the
first element of each list.  // O(k log k)
2. So the first element in the first list is the smallest element. Put
the smallest into the result array. // O(1)
3. Then, using binary search to find the new position of the first
list  // O(k)
4. These lists are still sorted, so the first element in the first
list is still smallest. Just repeat the step 2, 3 n times.

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