My Javascript solutions


  • 0
    J
    var containsDuplicate = function(nums) {
        var i, nLength = nums.length;
        for(i = 0; i<nLength; i++){
            if(nums.indexOf(nums.pop())>-1){
                return true;
            }
        }
        return false;
    };

Log in to reply
 

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