SoundHound Interview Question

Find the average distance between all a's and b's in a string.