My Most Interesting Interview Problem
21–30 of 56 posts
Re: My Most Interesting Interview Problem
#22What kind of job was this for? After stumbling through questions involving trees, arrays and other data structures, I have come to the conclusion that I'm a mathematician dressed up as a mediocre programmer.
Re: My Most Interesting Interview Problem
#23Re: My Most Interesting Interview Problem
#24The most recent spectacular failure happened when interviewer asked about sets, i described Java Set interface as an example (they are Java shop so i thought the choice was right), looking dissatisfied he asked to talk about "sets" in general, and got, lets say, really confused, when i tried to elicit whether he means naive set theory - seeing that i didn't hit what he wanted, i offered along the lines of Russel's theory of types, ... the guy got almost angry and said "just sets in general", and i kind of supposed that we settled on naive, though it sounded like he didn't like "naive"... he asked what we can do with a set, like for example iterate over its elements, i noted that that of course depends on the set's cardinality ... by look on his face at that moment it was really clear that the interview is finished.
Re: My Most Interesting Interview Problem
#25For the interested, the easieat way of generating random points on a circle is drawing (x,y) component-wise from a normal distribution and then normalizing the vector. (And two independent Gaussian variables can be easily sampled using the Box-Muller transformation.)
Re: My Most Interesting Interview Problem
#26For the interested, the easieat way of generating random points on a circle is drawing (x,y) component-wise from a normal distribution and then normalizing the vector. (And two independent Gaussian variables can be easily sampled using the Box-Muller transformation.)
Edit: I mean R2 to S2 (although this is bijective)
Re: My Most Interesting Interview Problem
#27What are the practical applications to something like this?
Re: My Most Interesting Interview Problem
#28Earlier quoted context omitted.
I'd rather take a random uniform distribution from 0 to pi and take it as the arc-length. Why is your construction 'uniform' on the circle?
> Why is your construction 'uniform' on the circle? That's a very good question, and the sort of thing that would need to be in a comment somewhere. The answer is that the bi-normal distribution is rotationally symmetrical, a fact that is not immediately obvious. > I'd rather take a random uniform distribution > from 0 to pi and take it as the arc-length. That's a good solution for the simple one-dimensional circle i…
Re: My Most Interesting Interview Problem
#29Earlier quoted context omitted.
No, because the two angles can't easily be combined to make the resulting point uniform on the sphere. For instance, if you call one of the angles "latitude", and one "longitude", then you will get too many samples near the poles -- think about how the lines of constant longitude start out widely spaced on the equator, but then converge at the poles. This would cause points to pile up at the poles. Your proposal hits…
Ah, of course, thanks.
Re: My Most Interesting Interview Problem
#30What are the practical applications to something like this?
Random search is quite useful for hyperparameter optimization, and it can be a useful building block for something like simulated annealing or parallel tempering.