Skip to content

Comment on Java Puzzle: Square Root

Comments

Force a race condition on the variable `root'.

    if (n.divide(root).equals(root)) {
Try to set it to 2^20001 on the first funcall and 0 on the second.

BigInteger is immutable so this won't work

You're right! Good catch.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.