JavaScript


  • 0
    J

    var missingNumber = function(nums) {

    for(let i=0;i<=nums.length;i++){
    	if(nums.indexOf(i) == -1){
    		return i;
    	}
    }
    

    };


Log in to reply
 

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