You may search at google for the paper Prime is in P for a P algorithm.
Note this algorithm is not that fast when given n is small.
On Thu, Jun 19, 2008 at 1:55 PM, zee [EMAIL PROTECTED] wrote:
hi everyone ...
any efficient algo to find a number is prime or not ???
(i agree the question
Till now, nobody successfully generate this puzzle.
On Wed, Apr 9, 2008 at 8:59 PM, adak [EMAIL PROTECTED] wrote:
I'm also very curious about Sudoku. Particularly the search for a grid
with a unique answer, from only 16 given values.
First problem is how to generate EVERY Sudoku grid which
A rooted tree or a general tree?
On Jan 29, 2008 3:07 PM, Debajit Adhikary [EMAIL PROTECTED] wrote:
Lets say I have a weighted tree (with positive, zero and negative
weights for each node).
How could I best find the subtree having the maximum weight?
sort the sums, call them s1, s2, s3,..., satisfy s1 = s2 = s3 =
and set the n integers by a1, a2, a3, satisfy a1 = a2 = a3 =
so we can sure that s1 = a1 + a2, and s2 = a1 + a3, and what is a2 + a3?
only a1 + a4, a1 + a5, ..., a1 + an can less than a2 + a3, so a2 + a3 is one
of s3, s4, ...
Calculate center of a tree, can be solved in O(n).
On 10/25/07, dkrai [EMAIL PROTECTED] wrote:
Another approach can be to eliminate leaf nodes iteratively from tree.
At last only root node or nodes on same level will be left.
Adjency list representation of graph will make it easier to
Generally, it's impossible...
-- Forwarded message --
From: 刘昊 [EMAIL PROTECTED]
Date: Aug 17, 2007 7:58 PM
Subject: [algogeeks] Delete element in a sorted array with O(1) time
complexity.
To: Algorithm Geeks algogeeks@googlegroups.com
Hi, folks,
As the title of the post
Implements yourself please.
On 7/21/07, TheTravellingSalesman [EMAIL PROTECTED] wrote:
I'm using Java programming language and I'm trying to implement the
shortest path algorithm.
One thing I'm struggling with is how do I represent nodes and edges in
Java. Don't know of too many Java
What's Mordad and Shahrivar? Is it an English word?
On 7/19/07, Mohammad [EMAIL PROTECTED] wrote:
قابل توجه علاقمندان به مسابقات برنامه نویسی،
چهارمين دوره از مسابقات برنامه نویسی IAUMCCC ، تابستان امسال در
دانشگاه آزاد اسلامی برگزار خواهد شد. این سری از مسابقات سه مرحله ای می
باشد. مرحله
No, longest path isn't that easy. We can find the Halminton path as well as
the longest path, but...
On 6/20/07, Muntasir Khan [EMAIL PROTECTED] wrote:
On 6/20/07, mirchi [EMAIL PROTECTED] wrote:
can anyone please tell me how to find
single source longest path in a directed acyclic
a c style string with length n needs n+1 memory space.
On 5/16/07, mirchi [EMAIL PROTECTED] wrote:
hello people ,
i am facing a problem in submission of The Hamming Disteance
problem. the output seems to be fine. but the program crashes in
between. the error says:
The instruction at
10 matches
Mail list logo