Ad
  • Custom User Avatar

    I made a 0 return type to try and identify tricky inputs

    Usually this is done by logging the input... Putting return 0 at the end of the function doesn't guarantee that you'll reach it. Your nested if statements are causing this.

  • Default User Avatar

    What would happen if the array was [True, True] and the operation was and?
    It may help to print out your code to see what happens more easily.