by substituting the dimension of \([T] = [T]\)
\([S] = [M{T^{ - 2}}],\,[r] = [L],\,[\rho ] = [M{L^{ - 3}}]\)
and by comparing the power of both the sides
\(x = - 1/2,\,y = 3/2,\,z = 1/2\)
so \(T \propto \sqrt {\rho {r^3}/S} \Rightarrow T = k\sqrt {\frac{{\rho {r^3}}}{S}} \)