225 reputation
38
bio website
location
age
visits member for 2 years, 3 months
seen Jun 18 '13 at 19:10

Jul
8
awarded  Notable Question
Jan
14
awarded  Notable Question
Jun
12
awarded  Popular Question
May
27
awarded  Yearling
May
27
asked How to rotate an array of bits
Feb
7
awarded  Popular Question
Nov
15
awarded  Peer Pressure
Nov
15
awarded  Custodian
Jun
16
accepted faster algorithm for finding all subsets
Jun
15
comment faster algorithm for finding all subsets
I see, so what you're saying is we can't do any clever tricks to avoid O(2^n). Right?
Jun
15
comment faster algorithm for finding all subsets
Yes you're right! I seem to have missed that use case. So how would you make the algorithm?
Jun
15
asked faster algorithm for finding all subsets
Jun
7
awarded  Commentator
Jun
7
comment questions on a particular algorithm
@scar Thanks for the detailed explanations and suggested alternative!
Jun
7
accepted questions on a particular algorithm
Jun
7
comment questions on a particular algorithm
@ratchetfreak but in the case of sqrt(25), it comes out to 5.0 so technically you don't lose any truncation in this case. So the 1L doesn't actually act as a ceil, but actually ends up adding 1 to make it 6. But again, as I said, I don't understand why...
Jun
7
comment questions on a particular algorithm
are you sure? I tried removing the 1L but doing so causes 25 to return true instead of false. It seems that this algorithm must round up on the sqrt to work but mathematically I don't understand why.
Jun
7
asked questions on a particular algorithm
Jun
7
comment finding houses within a radius
One thing I am curious about: given the vast number of homes for sale, do companies (such as Zillo maybe?) store it all in a db and just keep selecting from it? I imagine that'd be a huge performance hit and it'd be much faster to store it all in memory with a graph representation - maybe matrix or adjacency list and use distance algorithms to find nearest homes. What do you think?
Jun
7
accepted finding houses within a radius