This problem was asked in coding round of a product based company
You are given two circles as input in form of arrays, where each array is {a,b,r} in which {a,b} is center and r is radius of the circle.
Both circles lie in positive xy plane.
Return number of integral points that lies on or inside the common region of two circles.
Return 0 if no common point is found
Example:
Input:
a b r
4 5 3
6 7 2
Output:
6
See the below image for reference
Input:
a b r
3 3 2
5 3 2
Output:
5

(pardon my drawing skills, both are circles :D)
Please help me to solve this problem.