Frequency of occurrence

Given an sequence of integers, return the integer that occurs the most and its frequency of occurrence, as well as the integer that occurs the median number of times and it’s frequency.   For example [5,1,1,3,3,3] would have the number 3 occurring 3 times (mode) and would have the number 1 occurring 2 times which ...