LeetCode
Question
·
Feb 2025
Can anyone help with this question thinking process...✍️
74 views
3 replies
Question Details
We are initially given a integer number n. Find number of pairs (a,b) such that a*b is a perfect square. 1 <= a,b <= n 1 <= n <= 100000 Example: n =...
Full Details
We are initially given a integer number n.
Find number of pairs (a,b) such that a*b is a perfect square.
1 <= a,b <= n
1 <= n <= 100000
Example:
n = 4,
output: 6
explaination: (1,1),(2,2),(3,3),(4,4),(1,4),(4,1)
Free preview. Unlock all Square/Block questions →
About This Question
This is a reported interview question from a square/block interview for a swe role reported in 2025.
It covers the following topics: Coding .