add basic finding majority element in an array