as the diagram shows
The phenomenon where waves with different frequencies have slightly different speeds is known as "dispersion," because an impulse which begins with lots of different frequencies traveling together will "disperse" and spread out as the faster frequencies move ahead of the slower ones.
Acoustic dispersion is pretty easy to demonstrate. Here's a great video where the effect is audible in cracking ice on top of a lake, and also audible in struck metal cables. Acoustic dispersion in metal cables is how the foley artists for Star Wars created the iconic "pew pew" sound associated with the laser blasters in those movies. In both systems --- ice layers and metal cables --- the higher frequencies have a faster wave speed than the lower frequencies, which why it's "pew pew" rather than "wep wep."
If acoustic dispersion were important in air, then distant impulse sounds --- as from lightning bolts or fireworks explosions --- would also exhibit the "pew pew" effect. Thunder produced from medium-distance storms does tend to start off with high frequencies and end up with a low rumble, but in a chaotic way rather than in the musical way heard in the video for ice layers and metal cables. I think that frequency dispersion in thunder is more about echos off of the terrain and extinction of the higher frequencies in the air rather than the about the higher frequencies outrunning the lower ones.
The dispersion phenomenon (the variation of velocity with frequency) typically occurs when the wave is guided by a medium having at least one of its dimensions of the order of the wavelength (elastic waves in rods, in plates, acoustical waves in pipes, ...) or when it propagates along an interface (Rayleigh surface waves, for instance).
In general you could say that the speed of sound is the same in a certain medium (like air or water) under certain conditions.
As Wikipedia (Speed of Sound) states, describing the speed of sound in the medium air:
In fact, assuming an ideal gas, the speed of sound c depends on temperature only, not on the pressure or density (since these change in lockstep for a given temperature and cancel out). Air is almost an ideal gas. The temperature of the air varies with altitude, giving the following variations in the speed of sound using the standard atmosphere—actual conditions may vary.
And you have to take care that you don't mingle the terms frequency and speed. Frequency is the number of occurrences of a repeating event per unit of time. Regardless of what vibrating object is creating the sound wave, the particles of the medium through which the sound moves is vibrating in a back and forth motion at a given frequency. The sensation of a frequency is commonly referred to as the pitch of a sound. A high pitch sound corresponds to a high frequency sound wave and a low pitch sound corresponds to a low frequency sound wave.
In general, the speed of sound is the same, regardless of frequency. The speed of a wave is given by the following formula:
Where $v$ is the speed, $f$ is the frequency and $\lambda$ is the wavelength. If the frequency is higher, the wavelength will be shorter, but the speed is still the same.
Regarding your diagrams, the lower one is correct. The crests of the waves will travel at the same speed. However, for the higher-frequency wave, more crests will pass a particular point per second, because the wavelength is shorter.