Answer:
The greater the density of a medium, the slower the speed of sound. This observation is analogous to the fact that the frequency of a simple harmonic motion is inversely proportional to m, the mass of the oscillating object.
Air molecules have more energy at higher temperatures, which means they vibrate faster. This allows the sound waves to also travel faster because they are propelled by collisions between the molecules