Implemented solution for CodeEval's The Major Element challenge
https://www.codeeval.com/open_challenges/132/