I think that in test case 1 the answer should be [1 5].
Maybe the problem statement should specifically exclude the first and last elements?
Return a list sorted by number of occurrences
1504 Solvers
246 Solvers
5016 Solvers
277 Solvers
492 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!