hi am stuck im trying to figure out how i can find the majority of numbers say in a list with the time complexity of O(n)

say i have a given list of n elements finding all elements on the list that occur more then n/4 time.

how would i do this and how would it look in java code

please can any one help

hey
am not asking anyone to do my work
just would like some advise tho those links on the might be useful but iv read them i would like to get other peoples input knowledge on how or will it be possible to find a mojrity in a list ... which the time complexity would turn out to be O(n) linear of n/4
not n/2

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.