Given two given numbers a and b where 1<=a<=b, find the number of perfect squares between a and b (a and b inclusive).
Input:a = 9, b = 25Output:3Explanation:There are 3 perfect squares between 9
and 25. They are 9, 16, and 25.
Input:a = 1, b = 7Output:2Explanation:There are 2 perfect squares between 1
and 7. They are 1, and 4.
You don't need to read input or print anything. Your task is to complete the function numOfPerfectSquares() which takes 2 Integers a and b as input and returns the number of perfect squares between a and b.
Expected Time Complexity: O(1) Expected Auxiliary Space: O(1)