Solution for Mean Mode