So basically when it comes to the speed of sound, it is said that speed of sound in media is based on two main factors - 1)elasticity and 2)density from the formula
V= $\sqrt{E/\rho }$ where E is the modulus of elasticity and $\rho$ is the density.Now this represents that Speed of Sound is inverse to the density. Then how come is the speed of sound more in solids than in gases (which is a denser medium). I think it is because the elasticity might override the density part, but I am not able to understand the inverse relation cause it seems that closer the atoms are to each other (ie denser) there must be quicker flow of energy from one point to other. I agree that this might hinder the intensity, but how come does it affect the speed of sound?