- Notifications
You must be signed in to change notification settings - Fork2.4k
Add 0128-longest-consecutive-sequence.c#2100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
seinlin commentedJan 20, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
From the runtime point of view, this is not the best solution. But According to the official solution, using hash map will be considered as O(n). |
Thanks, looks good! If you wish, you could add both solutions on your file and separate them with comments, before merging? Sometimes, runtimes on Leetcode is not very accurate, also there could be specific testcases which will worsen a runtime by lot. |
Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.