Linagora Interview Question

create an algorithm to detect most frequest