Added brute-force majority algorithm