Assume the first list contains two 23 values and other two lists does not contain 23 .
Then also your algorithm will return 23 in the answer but in the question it is said that the majority is selected if the number appears in more than 1 list.
Read more… (48 words)