i didn't get anything plz elaborate
On Oct 10, 10:44 am, Prunthaban Kanthakumar pruntha...@gmail.com
wrote:
Sterling numbers of second kind.
On Sat, Oct 10, 2009 at 10:41 AM, vicky mehta...@gmail.com wrote:
example:
n=10,k=10
ans:1
n=30,k=7
ans:
475020
On Oct 10, 9:51 am,
I just noticed that in your problem the balls are 'similar'.
Then the solution is a simple composition and the answer is {n-1, k-1} where
{n,k} stands for binomial coefficient.
I will give a proof sometime later if needed.
On Sat, Oct 10, 2009 at 11:22 AM, vicky mehta...@gmail.com wrote:
i
@sandeep
notice that solution given on the given link doesn't satisfy the
conditions given in the above question.
@sharad
Both lists may have duplicate values. So in this case it will better
to hash the address of node instead of values.
One other way is to maintain a flag in each of the node.
There is an array A[N] of N numbers. You have to compose an array
Output[N] such that Output[i] will be equal to multiplication of all
the elements of A[N] except A[i]. For example Output[0] will be
multiplication of A[1] to A[N-1] and Output[1] will be multiplication
of A[0] and from A[2] to
There is a n x n grid of 1's and 0's. Find the i, where i is the row
containing all 1's, except the intersection point. Should do it in
less than 25 comparisons?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
a very simple proof of the formula is using generating function for counting
On Sat, Oct 10, 2009 at 3:08 PM, Prunthaban Kanthakumar
pruntha...@gmail.com wrote:
I just noticed that in your problem the balls are 'similar'.
Then the solution is a simple composition and the answer is {n-1, k-1}
Whats with the intersection point? Intersection of what two things are we
talking about here? Row of 1s and column of 1s?
On Sat, Oct 10, 2009 at 3:47 AM, Manisha pgo...@gmail.com wrote:
There is a n x n grid of 1's and 0's. Find the i, where i is the row
containing all 1's, except the
Nice solution Ramaswamy...
--~--~-~--~~~---~--~~
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
One other way will be using two pointers.
step1) Take two pointers(p1 and p2 ), pointing to the beginning of
list L1 and L2.
step2) Now start moving both the pointers simultaneously and check
whether they point to same node. If not, then move both pointers to
next node.
Step3) If any of pointer
By intersection point, I mean intersection of ith row and ith coulmn.
For instance,
1 0 0
1 1 1
1 1 0
Here the answer should be 3 as 3rd row contain all 1's except(3,3).
On Oct 10, 9:15 pm, Ramaswamy R ramaswam...@gmail.com wrote:
Whats with the intersection point? Intersection of what
find some of all the digits in number-100!
--~--~-~--~~~---~--~~
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
can anyone give me algorithm for finding the second largest element in
array using tournament method requiring n+logn-2 comparisons
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
traverse the array once and ge product of all elements , this is dividend
now again traverse for each a[i] do division(divisor,a[i])
code for division without using /
#includestdio.h
int dividend, divisor, remainder;
/* Division function Computes the quotient and remainder of two numbers
using
hope you mean find *sum* of all the digits in number-100! :)
2009/10/11 vicky mehta...@gmail.com
find some of all the digits in number-100!
--
Reduce, Reuse and Recycle
Regards,
Vivek.S
--~--~-~--~~~---~--~~
You received this message because you are
On another thought, constant time complexity would not be possible with no
constraints on the size of the matrix or any limitation on what possible
data it would have.
It wouldn't be possible to do it in 25 comparisons for a 1 Million x 1
Million grid. If there is no restriction on the data as
Project Euler!!
--~--~-~--~~~---~--~~
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
16 matches
Mail list logo