← 返回 doordash 的题目列表Debug Code with API Calls
类型:online_judge
You are given a piece of code containing add, remove, and random functions, which is similar to LeetCode problem 380. Identify the bugs in the code, focusing on the try-catch handling for downstream calls and whether the data object attribute is set to private.
Example
Input
add(1)
remove(2)
add(2)
getRandom()
remove(1)
add(2)