On Dec 5, 3:14 pm, Harshith harshi@gmail.com wrote:
I might be wrong here but, why can't you just sort the block A[i..j]
it will take O((j-i)log(j-i)) (there are many O(n logn) sorting
algorthms) steps and then just look if they are in sequence trivially
another j-i steps.
Don't see
I think this problem can be reduced to:
For a particular element in Superblock, find all the subblocks which
contains next element or the NULL. For example, take first element i.e. 7,
we need to find all the blocks which has 7 and has 3 or NULL as its next
element in the subblock.
Now suppose in
Hi,
Consider the sequence 1,2,3,4,5,6...,n. There are n^2 blocks, so the
question may not be correct.
Regards
Aditya Shankar
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
These are the steps for the O(n^2) solution
n=length of A
for each subarray A[i,j] where ji
min=min(A[i,j])
max=max(A[i,j])
if(max - min==size (A[i,j]) print A[i,j]
min[A[i,j]]=min( A[j], min(A[i,j-1])
similar one for max
Note:
A[i,j] = A[i],A[i+1]A[j]
I was
check this if
How To Install Dreamweaver CS3 In Ubuntu
Hardyhttp://eaziweb.blogspot.com/2009/12/how-to-install-dreamweaver-cs3-in.html
Regards
Shahzeb Farooq Chohan
Software Engineer
Cogilent Solutions
Get your new Email address!
Grab the Email name you've always wanted before someone
On Dec 2, 6:45 am, Vinoth Kumar vinoth.ratna.ku...@gmail.com wrote:
These are the steps for the O(n^2) solution
n=length of A
for each subarray A[i,j] where ji
min=min(A[i,j])
max=max(A[i,j])
if(max - min==size (A[i,j]) print A[i,j]
min[A[i,j]]=min( A[j],
On Dec 2, 10:42 am, Geoffrey Summerhayes sumr...@gmail.com wrote:
It's a binary tree, [ 7 3 4 1 2 6 5 8] has children
[ 7 3 4 1 2 6 5] and [ 3 4 1 2 6 5 8], all the way
down to [ 7 3] [3 4] [4 1] ...
If you start at the bottom keeping track of min and max
for each node, if max-min == node
That doesn't quite get it, try the input [ 7 3 4 2 1 6 5 8] and your
idea would miss [3 4 2]
On Dec 1, 10:10 am, sharad kumar aryansmit3...@gmail.com wrote:
find out the subseq which are consecttive
concatenate them at each level to get the entire set.
On Tue, Dec 1, 2009 at 12:03 PM, Vinoth
No need for the code guys.
Can u give me a algo or pseudo code for this problem.
I can think of a soln of O(n^2) but i need a algo for O(nlogn)
On Wed, Dec 2, 2009 at 2:06 AM, NickLarsen fodylar...@gmail.com wrote:
That doesn't quite get it, try the input [ 7 3 4 2 1 6 5 8] and your
idea
Vinod. Can you please mention steps for the O(n^2) solution that you
have thought of.
On Dec 2, 9:50 am, Vinoth Kumar vinoth.ratna.ku...@gmail.com wrote:
No need for the code guys.
Can u give me a algo or pseudo code for this problem.
I can think of a soln of O(n^2) but i need a algo for
10 matches
Mail list logo