@@ -22,19 +22,17 @@ You must implement the functions of the class such that each function works on *
22
22
["RandomizedCollection", "insert", "insert", "insert", "getRandom", "remove", "getRandom"]
23
23
[[], [1], [1], [2], [], [1], []]
24
24
25
- ** Output:**
26
-
27
- [null, true, false, true, 2, true, 1]
25
+ ** Output:** \[ null, true, false, true, 2, true, 1\]
28
26
29
27
** Explanation:**
30
28
31
29
RandomizedCollection randomizedCollection = new RandomizedCollection();
32
30
randomizedCollection.insert(1); // return true since the collection does not contain 1.
33
31
// Inserts 1 into the collection.
34
32
randomizedCollection.insert(1); // return false since the collection contains 1.
35
- // Inserts another 1 into the collection. Collection now contains\ [1,1\ ].
33
+ // Inserts another 1 into the collection. Collection now contains [1,1].
36
34
randomizedCollection.insert(2); // return true since the collection does not contain 2.
37
- // Inserts 2 into the collection. Collection now contains\ [1,1,2\ ].
35
+ // Inserts 2 into the collection. Collection now contains [1,1,2].
38
36
randomizedCollection.getRandom(); // getRandom should:
39
37
// - return 1 with probability 2/3, or
40
38
// - return 2 with probability 1/3.