Sort array item on the basis of frequency they are present Javascript

后端 未结 0 1324
谎友^
谎友^ 2021-02-07 00:01

[2,1,9,1,2,5,1,6,1]. transforms to ----> [5,6,9,2,2,1,1,1,1]

follow the above transformation .

//if frequency is same ascending order is to be maintained. 5,6,

相关标签:
回答
  • 消灭零回复
提交回复
热议问题