Linagora interview question

create an algorithm to detect most frequest