Thank you for the code snippet.
What I don't understand is
if( (double)rand() / RAND_MAX 1 / k )
Here, Why do we use less than inequality?
Why won't Udit's solution of just using the minimum random number work?
On Tuesday, 1 January 2013 20:57:47 UTC+5:30, Dave wrote:
@Doom: Yes
Hi Dave
Please help me with some additional clarification regarding the
implementation of this algo. How do we make use of random number generator?
And is it necessary to traverse the list until the end?
On Friday, 28 December 2012 19:35:07 UTC+5:30, Dave wrote:
@Sanjeev: Set a pointer p
If we expand it.. E(t) = E(t1) + E(t2) + E(t3) + ... + E(tn);
here I am able to derive E(t1) as N/1 using the expression E(t1) = 1/N +
((N-1)/N)(E(t1) + 1);
but how do I proceed?
How do I derive the E(t2) and so on??
What do these values mean??
Does it mean like E(t2) is the no. of expected
wrong.
On Fri, Apr 6, 2012 at 10:53 PM, Doom duman...@gmail.com wrote:
Here is the reference:
http://stackoverflow.com/questions/3753928/finding-border-of-a-binary...
None of the proposed solutions is effective enough. Any ideas?
--
You received
Here is the reference:
http://stackoverflow.com/questions/3753928/finding-border-of-a-binary-tree
None of the proposed solutions is effective enough. Any ideas?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the
We have seen the question of computing the diameter of binary tree. Any
ideas to compute the path of nodes along that diameter? No parent pointer
exists.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web
Any pointers to a code using NFA / DFA computation model?
--
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/-/UO5Em7j89scJ.
To post to this group, send email to
Can any one help me in understanding the concept? Here is the reference
link:
http://stackoverflow.com/questions/8288820/pruning-number-of-a-binary-tree
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web
each number with its count
times.
I'm not sure whether it is appropriate to call it in-place, but at
least it doesn't use O(n) space.
Sent from my Windows Phone
=E5=8F=91=E4=BB=B6=E4=BA=BA: Doom
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2012/4/4 20:05
=E6=94=B6=E4=BB=B6=E4=BA=BA: algogeeks
@Don: Any ideas which oppose the above proposed solution?
On Saturday, 24 March 2012 21:52:49 UTC+5:30, Don wrote:
Build a graph in which each box is a vertex and there is an edge from
A to B if B can fit inside A. Then use the longest path algorithm to
find the solution.
Don
On Mar
@Don:
Could you please explain ur tree approach with an example?
Thanks
Doom
On Tuesday, 3 April 2012 02:52:17 UTC+5:30, Don wrote:
I did that by building a tree in which each node stores the
configuration, including number of steps to that point, amount of
water in each bucket
how are you going to do it in-place?
On Wednesday, 4 April 2012 13:24:01 UTC+5:30, Siddhartha wrote:
if the length of the binary representation of elements is logn, then the
elements themselves are of size less than 2^log(n)=n.
as all the elements are less than n, use counting sort!!!
--
What is wrong with atul's solution of longest decreasing subsequece on
length after sorting on area? I think the relationship is transitive as
well.
e.g. box a fits inside b.
box b fits inside c
by transitivity, box a fits inside c.
Isn't this fine?
On Saturday, 24 March 2012 22:25:33
Any ideas?
--
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/-/aGzMcjTFcAYJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from
14 matches
Mail list logo