How do you handle the "null" return (in Java)?

  • 0

    What if there isn't any intersection exists? Should I return "null"? But the default Java code defines the method as "int[]" which means I can't return a "null" value.

Log in to reply

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