This need extra space.
For simple problem, I guess sorting is enough, :)
In fact everytime we face a problem, sorting should be the first method
for trying.
There are too much researches on sorting and I guess everyone should be
familiar with sorting nowadays,
(At least they should know who's
contact me, I can guild you to some programming site for freelancer jobs
so that you will not bother other guys in this unrelated group
my mail:
[EMAIL PROTECTED]
thanks
monty 1987 写道:
Hi Bloke,
I am really interested in some good networking project.Can anyone
suggest me and become my
wow, yeah, he is one of the greatest man
jesse.wanderer 写道:
Knuth's 70 birthday has just passed.
Happy birthday to this great guy!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
to N-1, its O(N).
~Vishal
On 9/24/07, *daizisheng* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
I think hash method is ok, at lease in expectation way it's O(n)
why not use it? it's very effeciently
I think there should be some worst case O(n) algorithm
Vishal 写道:
Hash table should give you O(1) insertion and search complexity; which
is what we need, right?
There is no constraint on space complexity, I believe.
On 9/24/07, * daizisheng* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
the problem is you need a hash table
Consider the following game. We have a probability distribution on
the following countably infinite deck of cards.
Card # front backprobability
-- - ---
1 1 3 1/2
2 3 9
I have a Bipartite Graph (U,V).
I want to use vertices set U to cover V.
That means, I choose a subset S of U, for each vertex *y* of V, there
is at least one vertex
*x* of U such that (x,y) is an edge of the original graph.
How to find a minimum such set S?
It there any effecient algorithm?