a:=[]int{2,1,3}排序结果是[1,2,3]索引重置0,1,2如何在排序的时候保留原先的索引1,0,2
2 回答
侃侃尔雅
TA贡献1801条经验 获得超16个赞
程序不是这么设计的。既然想关了两个字段,为何不用maptypefoodstruct{typintpriceint}foods:=make(map[int]food,0)
添加回答
举报
0/150
提交
取消
