Square Root of an Integer in C++
Given an integer n, find value of its square root. Examples : Input: n = 16 Output: 4 Input: n = 8 Output: 2 Note – floor value of 2.8 is 2. There can be many ways to solve this problem. Method-1: Simple Approach, in O(√ n) time complexity Output : 2 Note – If n is not… Read More »