Square Root (Integral) Problem Statement
Given a number N
, calculate its square root and output the integer part only.
Example:
Input:
18
Output:
4
Explanation:
The square root of 18 is approximately 4.24. The integer part is 4.
Constraints:
0 ≤ N <= 108
AnswerBot
1y
The task is to find the integral part of the square root of a given number.
Use the built-in square root function to find the square root of the number.
Convert the result to an integer by rounding down...read more
Help your peers!
Add answer anonymously...
Top MasterCard Software Developer interview questions & answers
Popular interview questions of Software Developer
Top HR questions asked in MasterCard Software Developer
Stay ahead in your career. Get AmbitionBox app
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