Java Solution beats 60%


  • 0
    E
    public class Solution {
        public int findMin(int[] nums) {
            int min=Integer.MAX_VALUE;
            for(int i=0;i<nums.length;i++){
                if(nums[i]<min){
                    min=nums[i];
                }
            }
            return min;
        }
    }
    

Log in to reply
 

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