[algogeeks] Re: Puzzle For Puzzled Minds -How Many Rounds..???

2011-02-25 Thread Venki
Yeah, Dave. It is simple, but small correction, we need 5621 games to figure out the winner. In general, if we are having n participants we need n - 1 games to determine the final winner. We can conclude the fact, by drawing the tournament tree for small numbers and count for the games to be held

Re: [algogeeks] In Place Merging of Two Sorted .Array...Not Easy as seems to be,....

2011-02-25 Thread ankit sambyal
Hey, it can be done in o(n*logn) time by calling maxheapify function on the two arrays. Then it decreases the size of the array whose last element is maximum of the two arrays. I hope you are aware of heap data structure and you have got the idea how to do it. If not let me know, it will explain

Re: [algogeeks] Re: Lets C Who Really Loves Perfect Square .................

2011-02-25 Thread Arpit Sood
dave how is this different from brute force ? On Thu, Feb 24, 2011 at 8:56 PM, Dave dave_and_da...@juno.com wrote: @Ashish: The code seems pretty straightforward, but okay. The outer for-loop runs through the numbers that have 10-digit squares. The squares are represented as 64 bit integers

[algogeeks] Call for Papers: The 2011 International Conference on Frontiers in Education: Computer Science and Computer Engineering (FECS'11), USA, July 18-21, 2011

2011-02-25 Thread A. M. G. Solo
   CALL  FOR  PAPERS and   Call For Workshop/Session Proposals     FECS'11     The 2011 International Conference on Frontiers     in Education: Computer Science and Computer Engineering      Date and

Re: [algogeeks] Re: amazon

2011-02-25 Thread Arulanandan P
@jalaj guys please understand how the static and extern work first. static makes the variables or functions defined in an object file to be local to that object file. When you declare the variable or function as extern , it means that definition is present in some other object file and it will

[algogeeks] Re: Lets C Who Really Loves Perfect Square .................

2011-02-25 Thread anurag
It is obviously a brute force technique... Is there any other way of doing it On Feb 25, 4:13 pm, Arpit Sood soodfi...@gmail.com wrote: dave how is this different from brute force ? On Thu, Feb 24, 2011 at 8:56 PM, Dave dave_and_da...@juno.com wrote: @Ashish: The code seems pretty

[algogeeks] Mathematics Problem

2011-02-25 Thread vaibhav shukla
Find the sum of digits of all the numbers whose digits are all in ascending order from left to right. All these numbers lie between 500 to 1000 and satisfy M divides (M-1)* !* + 1 , where M is any natural number. (* ! * denotes factorial of the number) -- best wishes!! Vaibhav Shukla

Re: [algogeeks] Mathematics Problem

2011-02-25 Thread Rel Guzman Apaza
Is there a maximum time complexity? 2011/2/25 vaibhav shukla vaibhav200...@gmail.com Find the sum of digits of all the numbers whose digits are all in ascending order from left to right. All these numbers lie between 500 to 1000 and satisfy M divides (M-1)* !* + 1 , where M is any natural

Re: [algogeeks] Mathematics Problem

2011-02-25 Thread vaibhav shukla
nothing to do with complexity... just the ans On Fri, Feb 25, 2011 at 10:23 PM, Rel Guzman Apaza rgap...@gmail.comwrote: Is there a maximum time complexity? 2011/2/25 vaibhav shukla vaibhav200...@gmail.com Find the sum of digits of all the numbers whose digits are all in ascending order

[algogeeks] Re: Puzzle For Puzzled Minds -How Many Rounds..???

2011-02-25 Thread Dave
@Venki. Hmmm. Let me see. The problem specified that there were 5623 participants. That makes n = 5623. You say that n-1 games are needed, and compute that as 5621. So you are saying that 5623 - 1 = 5621. Is that some kind of new math? Dave On Feb 25, 4:01 am, Venki venkatcollect...@gmail.com

[algogeeks] Re: Lets C Who Really Loves Perfect Square .................

2011-02-25 Thread Dave
@Arpit: Is there any requirement to do it other than by brute force? Besides, I think it is rather clever brute force. Dave On Feb 25, 5:13 am, Arpit Sood soodfi...@gmail.com wrote: dave how is this different from brute force ? On Thu, Feb 24, 2011 at 8:56 PM, Dave dave_and_da...@juno.com

Re: [algogeeks] Re: Lets C Who Really Loves Perfect Square .................

2011-02-25 Thread Arpit Sood
its just that i wanted to learn some other way too, where we don't go linearly over all values On Fri, Feb 25, 2011 at 11:54 PM, Dave dave_and_da...@juno.com wrote: @Arpit: Is there any requirement to do it other than by brute force? Besides, I think it is rather clever brute force. Dave

Re: [algogeeks] Re: In Place Merging of Two Sorted .Array...Not Easy as seems to be,....

2011-02-25 Thread ankit sambyal
@Jammy: No u didn't get me. Here is the explanation of what I meant: Input : two arrays a and b; and their size size_a andsize_b respectively. 1. Maxheapify both arrays 2. compare the last elements of both the arrays. If the last element of a is greater than b, swap both the elements . Then

[algogeeks] making a graphical c++ programme

2011-02-25 Thread UTKARSH SRIVASTAV
can anybody give me code of making a simple c++ graphical program. please also write statement of compiling and running the program in linux. and if you wish please explain the statements of program with comments... -- You received this message because you are subscribed to the Google

[algogeeks] Re: Lets C Who Really Loves Perfect Square .................

2011-02-25 Thread Dave
@Arpit: Actually, we didn't go over all of the values. The question asks about 10-digit perfect squares that have non-repeating digits. So n = 10^10-10^9. The brute force algorithm really would take a look at all n of those numbers and pick out the ones that both were perfect squares and had

Re: [algogeeks] Re: Antipodal points

2011-02-25 Thread vinay reddy
Hi Dave, I don't think ur logic will cover all cases like (1,1)(-3,-3), (1,1) (2,2) a line connecting these points passes through origin, i think the solution is, we need to compute the slope of the point at index i with origin and build a binary tree with theses slopes. but worst cases

Re: [algogeeks] Re: Antipodal points

2011-02-25 Thread Mohan Mangal
Hi Vinay, Here the condition is Point lies on same circle.. hope you got it. On Sat, Feb 26, 2011 at 10:58 AM, vinay reddy gvina...@gmail.com wrote: Hi Dave, I don't think ur logic will cover all cases like   (1,1)(-3,-3),      (1,1) (2,2)  a line connecting these points passes through

[algogeeks] [brain teaser ] 25february

2011-02-25 Thread Lavesh Rawat
*Bus Driver Problem Solution* ok let's say you're driving a bus and it's empty. At the first stop two(2) people get on. At the second stop five(5) people get on and one(1) person exits. At the third stop six(6) people get on and four(4) people exit. How old is the bus driver? Update Your Answers

Re: [algogeeks] making a graphical c++ programme

2011-02-25 Thread Logic King
I also want to know how to start making graphical program in c++..also can we integrate database with a c++ application. actually i want to make a c++ application using both c++ and databasehow should i start please guide me !!! On Sat, Feb 26, 2011 at 1:20 AM, UTKARSH SRIVASTAV