Pergunta de entrevista da empresa Google

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