Potential missed test case? Bug?


  • 0
    L

    ["RandomizedSet","insert","remove","getRandom"]
    [[],[1],[1],[]]

    When I ran the following test case, I got a java exception as the expected result.
    The problem itself also doesn't cover the case where you call getRandom on an empty container.

    It also accepted my solution without my solution checking if my array was empty before accessing it.

    Does this need a fix?


Log in to reply
 

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