mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 23:11:41 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 425,
|
||||
"dislikes": 20,
|
||||
"dislikes": 21,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "[\"FirstUnique\",\"showFirstUnique\",\"add\",\"showFirstUnique\",\"add\",\"showFirstUnique\",\"add\",\"showFirstUnique\"]\r\n[[[2,3,5]],[],[5],[],[2],[],[3],[]]\r\n[\"FirstUnique\",\"showFirstUnique\",\"add\",\"add\",\"add\",\"add\",\"add\",\"showFirstUnique\"]\r\n[[[7,7,7,7,7,7]],[],[7],[3],[3],[7],[17],[]]\r\n[\"FirstUnique\",\"showFirstUnique\",\"add\",\"showFirstUnique\"]\r\n[[[809]],[],[809],[]]\r",
|
||||
@@ -52,7 +52,7 @@
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"70.1K\", \"totalSubmission\": \"134.4K\", \"totalAcceptedRaw\": 70125, \"totalSubmissionRaw\": 134353, \"acRate\": \"52.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"70.2K\", \"totalSubmission\": \"134.4K\", \"totalAcceptedRaw\": 70180, \"totalSubmissionRaw\": 134442, \"acRate\": \"52.2%\"}",
|
||||
"hints": [
|
||||
"Use doubly Linked list with hashmap of pointers to linked list nodes. add unique number to the linked list. When add is called check if the added number is unique then it have to be added to the linked list and if it is repeated remove it from the linked list if exists. When showFirstUnique is called retrieve the head of the linked list.",
|
||||
"Use queue and check that first element of the queue is always unique.",
|
||||
|
Reference in New Issue
Block a user