-
Notifications
You must be signed in to change notification settings - Fork 43
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leaves_Ga-Young #31
base: master
Are you sure you want to change the base?
Leaves_Ga-Young #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, you hit the main learning goals here. Well done. Take a look at my comments on time complexity. Let me know if you have questions.
# Time Complexity: O(n log n) ?? because of the word sort section | ||
# Space Complexity: O(n) where n is the length of the string array | ||
|
||
def grouped_anagrams(strings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the words can be any length the time complexity is O(n * m log m) where m is the length of the words since you're sorting each word.
# Time Complexity: O(n log n) ?? because of the hash sort_by section | ||
# Space Complexity: O(n) where n is the length of list | ||
def top_k_frequent_elements(list, k) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
# Time Complexity: ? | ||
# Space Complexity: ? | ||
def valid_sudoku(table) | ||
raise NotImplementedError, "Method hasn't been implemented yet!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you got started here, but didn't quite finish.
Hash Table Practice
Congratulations! You're submitting your assignment!
Comprehension Questions