-
Notifications
You must be signed in to change notification settings - Fork 39
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
🌊 - Kim #17
base: master
Are you sure you want to change the base?
🌊 - Kim #17
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.
Great work Kim! You hit the learning goals and even got the bonus. Well done. I had a few minor comments, but this is great.
# Time Complexity: O(n) where n is the number of chars | ||
# Space Complexity: O(n) where n is the number of words | ||
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.
👍 Interesting solution, the time complexity is O(n) if the words are pretty short, if they're unlimited in length the time complexity is O(nm) where m is the length of the longest string.
# Time Complexity: O(n log n) | ||
# Space Complexity: O(n) | ||
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.
👍 Well done
# Time Complexity: O(1) | ||
# Space Complexity: O(n) | ||
def valid_sudoku(table) |
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.
👍 I would say the time/space complexities are both O(1) since Sudoku never gets bigger than 9x9.
Hash Table Practice
Congratulations! You're submitting your assignment!
Comprehension Questions