I think by using min/max heap we can fetch the kth largest/smallest data
from the heap. But here there is one more point how to ensure that the data
is smallest in last kth day. Here you can use interval/segment(augmented
version of heap tree) tree, where u can store the interval/segment on the
just have a look on segment tree ( u can found good study material on
segment tree at topcoder algorithm tutorial)
On Monday, 25 June 2012 18:13:50 UTC+5:30, Navin Kumar wrote:
please provide some good data structure to solve this problem:
http://www.careercup.com/question?id=14062676
- in general we use polynomial addition for the same.
If the numbers are carrying some additional information as ( particular
base or pattern) another mechanise can be designed
On Tuesday, 26 June 2012 15:40:39 UTC+5:30, ashgoel wrote:
Best Regards
Ashish Goel
Think positive and find fuel
This is a live problem from interviewstreet.com:
In the game challenges that we host, one practial problem that we face
is to rank the contestants. Contestants need to submit code for a game
problem and we pair up them against each other to see their relative
performance.
The aim of this
I have two binary sequences x and y (10 bits long)...I am taking a
bool array to store it.I have to implement the summation
operation( at most 40 summation operation)...while the bits patter
in changing in x and yin my approach before performing a sum I am
taking care of a. to
How can we check for the primality for very large number like 10^20 or
more. It is not stored in integer So integer operation would not work
on it.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
what are the efficient ways to check that a given number is primer
assuming the numbers can be large.
--
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
(n,m) = C(n*(n-1)/2, m) - ∑(∑C(n-1, n'-1) * f(n', m') *
C((n-n')*(n-n'-1)/2, m-m') for m' in [n'-1,m]) for n' in [1, n-1]
(C(N, K) is binomial coefficient choosing K from N)
The overall time complexity is O(m^2*n^2), and space complexity is O(mn)
On 2012-2-8 12:03, rspr wrote:
Hi All
for every event in sample space.is there any other
way that can optimize this calculation or may it possible that we can
directly calculate it.
.
rspr
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email