I got a problem in the following mission:
Station : Home
Mission : Sort Array by Element Frequency
Test case : frequency_sort([4, 6, 2, 2, 6, 4, 4, 4]) #[4, 4, 4, 4, 6, 6, 2, 2]
Problem :
Your result:[4,4,4,4,6,6,2,2,2]
Right result:[4,4,4,4,2,2,2,6,6]
Fail:frequency_sort([4,6,2,2,2,6,4,4,4])
The "Right result" seems not right!
Created at: 2020/01/13 03:54; Updated at: 2020/01/14 11:51