Find the square root of a number using only 4 basic arithmetic operations (+,-,*,/) without using a power operator and inbuilt libraries. For numbers that are not perfect squares, print the integer part of the result. Test Case 1: Input : 9 Output : 3 Test Case 2: Input : 20 Output : 4

AnswerBot
1y

Find square root of a number using basic arithmetic operations without power operator and inbuilt libraries.

  • Use binary search to find the integer part of the square root

  • Use long division method to fin...read more

Help your peers!
Add answer anonymously...
Amazon SDE Intern Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter