Google Interview Question

Develop an optimized algorithm and write the code for square root of a number without using any methods.