Domanda di colloquio di JPMorganChase

How would you estimate pi?

Risposte di colloquio

Anonimo

12 nov 2017

Classic question you can find in the hull. Recall that Pi was initially computed (millenaries ago) to capture the difference between the length (or surface or higher order integrals such as volume...) of a circular shape and a linear shape. Taking a unitary side square, it has a unit surface (1*1) as well whereas the circle inside has a 1/2 radius and therefore a surface of Pi * (1/2)^2 = Pi / 4. So if you are drawing unformely distributed 2 dimensional vectors in the range [0,1]x[0,1] = points in the unit square and you are subsequently counting those points lying inside the circle versus the overall number of points drawn, the ratio will converge towards Pi/4

Anonimo

8 set 2010

3,14

2