Yes, in both cases, if a wave reaches its maximum height or if we hear maximum sound 2 times a second, the frequency of the wave would be 2 Hz.
Frequency is defined as the number of cycles or oscillations of a wave that occur per second. In this case, if the wave reaches its maximum height 2 times a second, it completes 2 cycles in 1 second, resulting in a frequency of 2 Hz. Similarly, if we hear the maximum sound 2 times a second, it corresponds to 2 sound waves reaching our ears in 1 second, again giving a frequency of 2 Hz.