[algogeeks] Datastructure Space Complexity

2013-04-29 Thread Gary Drocella
My name is Gary Drocella, age 23, and got my BA in comp. sci. at University of Maryland College Park. I am reading a book for fun on my spare time Multidimensional and Metric Data Structures by Hanan Samet. They are talking about range trees, and they claim that a 1-dimensional range search

[algogeeks] Re: Amazon Interview Question

2013-04-29 Thread Gary Drocella
This will only work if each element in the array are relatively prime to one another, that is for any two elements x, y in array A the gcd(x,y) = 1, which is also just another way of saying no number divides another number in the array. Once this rule is broken, then the algorithm will no

[algogeeks] Re: Datastructure Space Complexity

2013-04-29 Thread Gary Drocella
On Monday, April 29, 2013 4:06:50 PM UTC-8, Gary Drocella wrote: My name is Gary Drocella, age 23, and got my BA in comp. sci. at University of Maryland College Park. I am reading a book for fun on my spare time Multidimensional and Metric Data Structures by Hanan Samet. They are

Re: [algogeeks] Re: Amazon Interview Question

2013-04-29 Thread Parag Khanna
use XOR On Tue, Apr 30, 2013 at 6:12 AM, Gary Drocella gdroc...@gmail.com wrote: This will only work if each element in the array are relatively prime to one another, that is for any two elements x, y in array A the gcd(x,y) = 1, which is also just another way of saying no number divides