KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have read this problem Find the most common entry in an array and the answer from jon skeet is just mind blowing .. :) Now I am trying to solve this problem find an element which occurs more than n/3 times in an array .. I am pretty sure that we cannot apply the same method because there can be 2 such elements which will occur more than n/3 times and that gives false alarm of the count ..so is there any way we can tweak around jon skeet's answer to work for this ..? Or is there any solution that will run in linear time ?
Tags (comma-separated)
Save Edits
Cancel