5 ms·
Monte Carlo method, calculating π
- compsciphd 12y agoThis was an interview Q on my Google interview. hated it (I ended up using Riemann sums)
- valdiorn 12y agoCurious, why did you hate it? (I use this as an interview question myself)
- anonova 12y agoThis is a pretty neat way to estimate pi. Rust uses this example in its std::rand documentation: http://doc.rust-lang.org/std/rand/#monte-carlo-estimation-of-π http://doc.rust-lang.org/std/rand/#monte-carlo-estimation-of...