Sorting in arrays

后端 未结 4 1248
被撕碎了的回忆
被撕碎了的回忆 2021-01-24 09:38

While sorting an array for ex: A[5]={1,4,5,3,2} the output must be 1,2,3,4,5 in ascending order. in using the concept of bubble sorting my output is 0,1,2,3,4 what would be the

4条回答
  •  鱼传尺愫
    2021-01-24 10:19

    Is there a reason you are doing bubble sort, other then trying to learn it? It's one of the slower sorts.

提交回复
热议问题