Simple Solution in Java


  • 0
    A

    {

    public int findMin(int[] num) {
       int l=num.length;
           int i=0;
          for(i=0;i<l-1;i++){
    	if(num[i]-num[i+1]>=0)
    		return num[i+1];
                        }
                     return num[0]; 
                              }
    

    }


Log in to reply
 

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