^ Exactly!
Dipit Grover
B.Tech in Computer Science and Engineering - lVth year
IIT Roorkee, India
--
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
Since the number of inversions are of order n^2 in the worst case, so
should be the complexity of printing them apparently.
--
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
Hi, you just need to see the figure carefully and derive a simple formula
here. The tiles are all regular hexagons and The figure shown is for the
given sample case where a=2,b=3,c=4, thereby implying that each side of the
hexagonal tile(say, x) satisfies :
x*(cos 30) = 1/2;
Thanks
Digo
--
http://yeees.com/
--
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
http://discuss.joelonsoftware.com/default.asp?interview.11.614716
--
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
] . So the second term would mean (1-dp[i-3])*1/2 * 1/2 *
1/2 .
Now the probability that Dave wins for any 'i' would be (1-dp[i]).
--
Dipit Grover
B.Tech in Computer Science and Engineering - lllrd year
IIT Roorkee, India
--
You received this message because you are subscribed to the Google
@Lucifer : I came up with a similar algorithm as yours but I dont
understand your complexity analysis : sum over all i (1 to M} { i*(M+N-i)
} .
Shouldnt it be M * sum over all i(1 to N) {(M+N-i)} ? M= no of
columns, N= no of rows . Since we always have the min element at the 0th
column of
@ all k-way people : I dont get it how the complexity would be O(m*n) . I
just went through the algo and I feel that one would need to find the
minimum element among the head-elements of all individual row-arrays, for
all the resulting m*n elements. I say so since we may not necessarily have
a
@Shady : you would definitely need two index variables for each array I
feel.
--
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
sorry I mean 1 variable per each array
--
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
^it cant get better than O(n) apparently. Just applying max-heapify once
would not yield the max element. You need to construct a heap for it, which
is no less than O(n).
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
@Lucifer (Regarding your latest approach) - I guess you meant string based
comparison sort in the first step, as in 9 would be greater than 10. The
special case seems correct but I doubt the complexity being nlog n,
considering the special case.
--
You received this message because you are
http://susam.in/downloads/mathematics/theorems/integer-triangles-with-fixed-perimeter.pdf
--
Dipit Grover
B.Tech in Computer Science and Engineering - lllrd year
IIT Roorkee, India
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
Shouldnt it be (n!)/2 ? Equivalent to permutation of n distinct numbers
except that we need to count each permutation once, since for any
permutation, there would also be a reverse permutation that would result in
an identical mst in the given scenario.
--
Dipit Grover
B.Tech in Computer
^ we need to count each permutation and its reverse together as one
possibility since both would result in identical mst.
--
Dipit Grover
B.Tech in Computer Science and Engineering - lllrd year
IIT Roorkee, India
--
You received this message because you are subscribed to the Google Groups
Mistake noted! Haste makes waste indeed.
--
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.
http://en.wikipedia.org/wiki/Cayley%27s_formula
--
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
Using binary search, first find the first occurrence of x. Using this first
occurrence run another binary search to find the last occurrence of x.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Hi everyone, I am stuck at places where I need to find lets say
Binomial_coefficient(1000,10) mod 1000 000 007 . What is the best way to do
this, assuming we donot have sufficient memory to use the naive approach :
(n,r) = (n-1,r) + (n-1,r-1) .
--
Dipit Grover
B.Tech in Computer Science
Thats really cool! Thanks Dave :)
--
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
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.
--
Dipit
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.
--
Dipit Grover
/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99
On Sat, Aug 27, 2011 at 3:13 PM, dipit grover digo.d.b...@gmail.comwrote:
http://groups.google.com/group/algogeeks?hl=en.
--
You received this message because you are subscribed to the Google Groups
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.
--
Dipit Grover
B.Tech in CSE
IIT Roorkee
--
You received this message because you
Oops, I just saw that Dave had already corrected it. Net problem, sorry
guys!
On Sat, Aug 27, 2011 at 11:02 PM, dipit grover digo.d.b...@gmail.comwrote:
I think you just need to reverse the comparison operators in Dave's earlier
post
On Sat, Aug 27, 2011 at 10:59 PM, Dave dave_and_da
25 matches
Mail list logo