It has been discussed here
http://groups.google.com/group/algogeeks/browse_thread/thread/5a3ccc1bfb4617fa/885438e251ffd330?lnk=gst&q=second+highest+element#885438e251ffd330
On Sun, Oct 11, 2009 at 8:21 PM, Manisha wrote:
>
> First find out the largest element and it requires n-1 comparison.
> Le
@gautam
*
find sum of all the digits in number->100!*
now show wat is significance of 9 in this ques ??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to al
@manisha
that is the ques..
there are many soln for 2 traversal
like loop in the linklist.
simple travesal
n many more..
On Sun, Oct 11, 2009 at 1:20 PM, ankur aggarwal wrote:
>
>
> *...@manisha
>> " one traversal for each of the lists"
>> *
>>
> "After* two traversals, *both pointers will surel
I meant the final single digit number that one gets...for eg
if the sum is 123 then the answer would be 1+2+3 = 6.
On Sun, Oct 11, 2009 at 6:59 PM, Prunthaban Kanthakumar
wrote:
>
>
> On Sun, Oct 11, 2009 at 6:40 PM, Gautham Muthuravichandran
> wrote:
>>
>> 9.. All the factorials above 5! is di
@ankur
6! = 1*2*3*4*5*6
= 1*2*3*4*5*(3*2)
= 1*2*(3*3)*4*5*2
= 1*2*9*4*5*2
= 9 * ( 1*2*4*5*2 )
=> 9x ( divisible by 9 )
Factorial of any number greater than 6 would be a multiple of 6! or a
multiple of 9. ie divisible by 9.
On Sun, Oct 11, 2009 at 7:29 PM, ankur aggarwal
wrote:
First find out the largest element and it requires n-1 comparison.
Lets say we have 8 elements then we need 7 comparison to decide
largest. Imagine the tree structure that you will use to find out
largest.
21
15 21
9
I kinda cheated on this question myself...
I used python ;)
ankur aggarwal wrote:
> @gautam
> i dont understand
>
> On Sun, Oct 11, 2009 at 6:59 PM, Prunthaban Kanthakumar
> mailto:pruntha...@gmail.com>> wrote:
>
>
>
> On Sun, Oct 11, 2009 at 6:40 PM, Gautham Muthuravichandran
> mailto:ga
make cuts to get pieces like 1,2and ,4
On Sun, Oct 11, 2009 at 6:19 PM, ankur aggarwal wrote:
> You've got someone working for you for seven days and a gold bar to pay
> them. The gold bar is segmented into seven connected pieces. You must give
> them a piece of gold at the end of every day. If yo
You've got someone working for you for seven days and a gold bar to pay
them. The gold bar is segmented into seven connected pieces. You must give
them a piece of gold at the end of every day. If you are only allowed to
make two breaks in the gold bar, how do you pay your worker?
--~--~-~-
Q1. Give steps to sort 5 numbers in minimum number of comparisons .Justify
that number of comparisons are minimum. Extend your argument for *N*numbers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks"
Correct. It will not be exactly one traversal of each list.
More precisely, in worst case each pointer will traverse one list
completely and then another list from beginning to intersection point.
On Oct 11, 12:49 pm, ankur aggarwal wrote:
> *...@manisha
> " one traversal for each of the lists"
@gautam
i dont understand
On Sun, Oct 11, 2009 at 6:59 PM, Prunthaban Kanthakumar <
pruntha...@gmail.com> wrote:
>
>
> On Sun, Oct 11, 2009 at 6:40 PM, Gautham Muthuravichandran <
> gautha...@gmail.com> wrote:
>
>>
>> 9.. All the factorials above 5! is divisible by 9.
>>
>
> Divisible by 9 does n
On Sun, Oct 11, 2009 at 6:40 PM, Gautham Muthuravichandran <
gautha...@gmail.com> wrote:
>
> 9.. All the factorials above 5! is divisible by 9.
>
Divisible by 9 does not mean exactly 9.
>
> -Gautham
>
> On Sun, Oct 11, 2009 at 11:54 AM, Debanjan wrote:
> >
> >
> >
> > On Oct 11, 10:29 am, Anil
9.. All the factorials above 5! is divisible by 9.
-Gautham
On Sun, Oct 11, 2009 at 11:54 AM, Debanjan wrote:
>
>
>
> On Oct 11, 10:29 am, Anil C R wrote:
>> Project Euler!!
>
> I remember I cheated on this problem :P At first I used my SPOJ FCTRL2
> solution to get the factorial of 100 then I
On Oct 11, 10:29 am, Anil C R wrote:
> Project Euler!!
I remember I cheated on this problem :P At first I used my SPOJ FCTRL2
solution to get the factorial of 100 then I simply add up those
digits :D
Most problems of Project Euler can be brute forced !
--~--~-~--~~~--
*...@manisha
" one traversal for each of the lists"
*
--~--~-~--~~~---~--~~
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 g
*...@manisha
> " one traversal for each of the lists"
> *
>
"After* two traversals, *both pointers will surely meet at intersection
point..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
@Debanjan
really nice 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
Project Euler (http://projecteuler.net) has an exciting set of questions.
Please don't spoil the fun of it by discussing them here. Once you solve a
problem in Project Euler, you get access to the discussion thread of the
problem.
./Channa
On Sun, Oct 11, 2009 at 10:59 AM, Anil C R wrote:
>
> P
19 matches
Mail list logo