Java 1D Array (Part 2)

  • + 0 comments

    The following lines from my code should prevent that from happening:

    if (i < 0 || array[i] == 1) {
            return false;
    }
    

    since they check for array out of bounds.

    HackerRank solutions.