367 reputation
212
bio website iphonegamedev.stackexchange.c…
location
age
visits member for 4 years, 3 months
seen Oct 9 '11 at 21:28

Aug
10
awarded  Notable Question
Jun
20
awarded  Nice Question
Oct
13
awarded  Popular Question
Jul
26
awarded  Popular Question
Jun
19
awarded  Nice Question
Oct
5
awarded  Nice Question
Sep
11
awarded  Yearling
Jul
7
accepted Card deck and sparse matrix interview questions
Jul
7
awarded  Editor
Jun
18
accepted How should I prepare for a coding phone interview?
Jun
17
asked How should I prepare for a coding phone interview?
May
26
awarded  Scholar
May
26
accepted Experience w/ eLance (and similar sites)
Mar
20
asked Experience w/ eLance (and similar sites)
Feb
26
comment Card deck and sparse matrix interview questions
@Renesis ok added them.
Feb
26
answered What is your favorite whiteboard interview problem?
Feb
26
answered What is your favorite whiteboard interview problem?
Feb
26
comment Card deck and sparse matrix interview questions
This is an important point. The implications are on the probability of shuffling each card being the same... I did manage to mention this.
Feb
25
comment Card deck and sparse matrix interview questions
I meant O(1) additional space (so not counting the space of the array you're given). Regarding your shuffle algorithm: I was thinking about implementing it with some tricky/clever indices into the original array. For example you can have an index to the "top" of the first "stack", an index to the "top" of the second stack and then do some clever swapping of values when shuffling. This approach is vaguely like performing heap-sort on an array with only O(1) additional space... i.e. it involves some clever swapping of values in the array.
Feb
25
comment Card deck and sparse matrix interview questions
Thanks for the reply. Your card shuffling algorithm sounds neat. Would be fun to try to implement it in O(n) time and O(1) space like the Knuth shuffle algorithm: tekpool.wordpress.com/2006/10/06/…