From 643a76d19fccce73eb4552c3e3d4ab77a97f3304 Mon Sep 17 00:00:00 2001 From: qq_44193969 Date: Thu, 18 Nov 2021 14:53:12 +0800 Subject: [PATCH] update exercises --- .../solution.md" | 7 +++---- .../solution.md" | 19 +++---------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git "a/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/1.355-\350\256\276\350\256\241\346\216\250\347\211\271/solution.md" "b/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/1.355-\350\256\276\350\256\241\346\216\250\347\211\271/solution.md" index b1b1ecbff..bc25d6827 100644 --- "a/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/1.355-\350\256\276\350\256\241\346\216\250\347\211\271/solution.md" +++ "b/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/1.355-\350\256\276\350\256\241\346\216\250\347\211\271/solution.md" @@ -18,15 +18,14 @@ 输入 -```json +``` ["Twitter", "postTweet", "getNewsFeed", "follow", "postTweet", "getNewsFeed", "unfollow", "getNewsFeed"] - [[], [1, 5], [1], [1, 2], [2, 6], [1], [1, 2], [1]] ``` 输出 -```json +``` [null, null, [5], null, null, [6, 5], null, [5]] ``` @@ -173,8 +172,8 @@ private: */ ``` -## 选项 +## 选项 ### A diff --git "a/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/3.381-O(1) \346\227\266\351\227\264\346\217\222\345\205\245\343\200\201\345\210\240\351\231\244\345\222\214\350\216\267\345\217\226\351\232\217\346\234\272\345\205\203\347\264\240 - \345\205\201\350\256\270\351\207\215\345\244\215/solution.md" "b/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/3.381-O(1) \346\227\266\351\227\264\346\217\222\345\205\245\343\200\201\345\210\240\351\231\244\345\222\214\350\216\267\345\217\226\351\232\217\346\234\272\345\205\203\347\264\240 - \345\205\201\350\256\270\351\207\215\345\244\215/solution.md" index 05ce395e3..6bfbca6fa 100644 --- "a/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/3.381-O(1) \346\227\266\351\227\264\346\217\222\345\205\245\343\200\201\345\210\240\351\231\244\345\222\214\350\216\267\345\217\226\351\232\217\346\234\272\345\205\203\347\264\240 - \345\205\201\350\256\270\351\207\215\345\244\215/solution.md" +++ "b/data/3.\347\256\227\346\263\225\351\253\230\351\230\266/5.leetcode-\350\256\276\350\256\241/3.381-O(1) \346\227\266\351\227\264\346\217\222\345\205\245\343\200\201\345\210\240\351\231\244\345\222\214\350\216\267\345\217\226\351\232\217\346\234\272\345\205\203\347\264\240 - \345\205\201\350\256\270\351\207\215\345\244\215/solution.md" @@ -12,35 +12,22 @@

示例:

-
// 初始化一个空的集合。
-
+```java
+// 初始化一个空的集合。
 RandomizedCollection collection = new RandomizedCollection();
-
 // 向集合中插入 1 。返回 true 表示集合不包含 1 。
-
 collection.insert(1);
-
 // 向集合中插入另一个 1 。返回 false 表示集合包含 1 。集合现在包含 [1,1] 。
-
 collection.insert(1);
-
 // 向集合中插入 2 ,返回 true 。集合现在包含 [1,1,2] 。
-
 collection.insert(2);
-
 // getRandom 应当有 2/3 的概率返回 1 ,1/3 的概率返回 2 。
-
 collection.getRandom();
-
 // 从集合中删除 1 ,返回 true 。集合现在包含 [1,2] 。
-
 collection.remove(1);
-
 // getRandom 应有相同概率返回 1 和 2 。
-
 collection.getRandom();
-
-
+```

以下错误的选项是?

-- GitLab