相关疑难解决方法(0)

std :: map,如何按值排序,然后按键排序

我需要按值排序地图,然后按键排序.我有一张包含这样内容的地图......

  1  realistically
  8         really
  4         reason
  3     reasonable
  1     reasonably
  1     reassemble
  1    reassembled
  2      recognize
 92         record
 48        records
  7           recs
Run Code Online (Sandbox Code Playgroud)

我需要按顺序获取值,但是关键是在值按顺序后键需要按字母顺序排列.最好的方法是什么?

c++ sorting algorithm dictionary key

38
推荐指数
2
解决办法
14万
查看次数

标签 统计

algorithm ×1

c++ ×1

dictionary ×1

key ×1

sorting ×1