note
baxy77bax
ok yes this is the first level that i probably didn't explain as well as i shpuld. but that is what i was talking about and complaining that this runs in O(X) time where <code>X= |A[i,j]|</code>. Now if you would preprocess this one more time to get from :
<code>
100101000100
A[0] A[7]
1 | 001010 | 0
</code>
to
<code>
1 | 0 | 0 > in this array you need to do 3 jumps (for my $p ( $s .. $e ))
#the reduction follows from the Cartesian tree that follows from the bit-vector 100101000100#
</code>
you would need to do only 3 jumps and so on and so on. and this iterative preprocessing will in the end place a tree on top of my vector. and searching such binary tree is faster. So what i need is a better preprocessig of my initial 100101000100. so i can save it in a Sparse table and in just 2 comparisons (steps) do what you achieved here in 7 (X)steps. Or if something totally crazy is suggested that will blow my mind straight down-under :) I will not complain :)
<p>
Thank You !!
<p>
baxy
929375
929384