look here: http://en.wikipedia.org/wiki/Kd-tree
--
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.
To unsubscribe from this group, send email to
http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
--
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.
To unsubscribe from this group, send email to
@Divesh I have updated my algo and Array A[1,2,3.n] is sorted with
unique elements.CALL FIND_EQUAL(A,1,n)
int FIND_EQUAL(A,start,end)
1.Go to the middle element
2. If A[mid]mid)
3. if(start==mid)
4 return mid-1;
5return FIND_EQUAL(A,1,mid-1);
6 if(A[mid]=mid)
7
actually a greedy approach for this problem exists:
just convert the first row and first column to all zeros
if after this step matrix is not a complete zero matrix then it's impossible
to make it
On Sun, Dec 5, 2010 at 9:10 AM, Prims topcode...@gmail.com wrote:
How do i convert a binary
Amir
Could you please explain with an example in detail?
On Dec 6, 7:02 pm, Amir hossein Shahriari
amir.hossein.shahri...@gmail.com wrote:
actually a greedy approach for this problem exists:
just convert the first row and first column to all zeros
if after this step matrix is not a complete
You guys are working too hard. Think about the sequence of numbers
[ A[i] - i | i = 0,1,2,...n-1 ]. You are trying to probe this
sequence to find the number of zeros. If you think about it for a
while, you will see that this sequence is non-decreasing. It must be
a segment of zero or more
I should have mentioned that this problem only makes sense if the
array values must be unique.
On Dec 6, 8:20 pm, Gene gene.ress...@gmail.com wrote:
You guys are working too hard. Think about the sequence of numbers
[ A[i] - i | i = 0,1,2,...n-1 ]. You are trying to probe this
sequence to
I tried solving that prob..here's my code
#includeiostream
#includestring
using namespace std;
main()
{
string s;
cins;
while(1)
{
if(s.size()==1 s[0]=='*')
break;
int length=1,curr=0,start=0,count=1;
for(int i=1;is.size();i++)
{
if(s[i]!=s[curr]
q = (len 1) 1;
what this line is accomplishing?
On Dec 4, 12:38 pm, Abioy Sun abioy@gmail.com wrote:
Hello,
2010/12/4 siva viknesh sivavikne...@gmail.com:
Modified 2 color sort problem i.e. you are given an array of integers
containing only 0s and 1s.You have to place all the 0s