HI Mansi, Lets see how we can approach for such a problem. The symetry of the problem suggests that the four charges will form a square (let say of side a). For general solution lets take length of string to be l, mass and charge of a signgle charge as m & q.
Electric force (Fe) on any given charge because of other three
= kq^2/(2a^2) -------(from charge digonally opposite)
+2*kq^2*sin(45o)/(a^2) -------- (from two adjecent charges. sin(45) comes as only component in digonal direction will add up)
Gravitational force on mass=(Fg)=mg
Resultant of both is balanced by tension which acts along the string. Let this string makes an angle theta with vertical. Then
sin(theta)=(a/root(2))/l = Fe/root(Fe2+Fg2)
Solve t his to get a.
Minimum distance between charges =a
Maximum distance = root(2)*a