c clean code, 3ms


  • 0
    H
    int findMin(int* nums, int numsSize) {
        int min = nums[0];
        for(int i = 1; i < numsSize; i++){
            if(nums[i] < min){
                min = nums[i];
                break;
            }
        }
        return min;
    }
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.