| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12757 | All Top 1 |
|
Description
Given a two lines of text, you need to parse it and perform the following requirements.
In this test, you need to find the top frequent element.
If there are some elements have same frequency, please order them according to the order of occurrence.
Input
Two lines of text will be given as an input.
The format for each line of the text are:
0,1,3,5,1,5,3,7,8,7,9,0,2,5,4
,
The first line is the input text, and the second line is a delimiter. (We may change the delimiter )
Hint: Not all elements are numbers.
Output
The format for output text is:
5
Print top frequent elements from the input text.
If there are many elements have the same frequency, please order them according to their appearance order.