Why would 1 be the correct answer for input [0]?


  • 0
    A

    This is the question:

    Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.

    Surely, based on the questions, if an array = [0], then there is no missing number!


Log in to reply
 

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