Sound waves travel faster in solids than liquids and travel faster in denser medium.
Sound travels by compression and rare fraction of the medium. In solids or denser medium, particles and very near to each other therefore compression and rare fraction can be done easily. velocity of sound is directly proportional to the elasticity of the medium, solids and denser medium have high elasticity so velocity of sound is more.