Finding smallest value in an array most efficiently

后端 未结 13 1720
慢半拍i
慢半拍i 2020-11-29 07:02

There are N values in the array, and one of them is the smallest value. How can I find the smallest value most efficiently?

13条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 07:50

                    //smalest number in the array//
        double small = x[0];
        for(t=0;t

提交回复
热议问题