-
Notifications
You must be signed in to change notification settings - Fork 53
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
Earth - Anya #32
base: master
Are you sure you want to change the base?
Earth - Anya #32
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.
The methods work Anya, but you do need to look more closely at your space/time complexities.
# Time complexity: O(n) | ||
# Space complexity: O(n^2) | ||
def factorial(n) |
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.
👍 But your space complexity is O(n)
# Time complexity: O(n) | ||
# Space complexity: O(n^2) | ||
def reverse(s) |
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.
👍 But your space/time complexity is O(n^2)
# Time complexity: O(n) | ||
# Space complexity: O(n^2) | ||
def reverse_inplace(s) |
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.
Consider adjusting the header to be like this.
def reverse_inplace(s, low=0, high=s.length - 1)
# Time complexity: O(n) | ||
# Space complexity: O(n) | ||
def bunny(n) |
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: O(n) | ||
# Space complexity: O(n^2) | ||
def nested(s) |
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.
👍 However the space/time complexity are both O(n^2)
# Time complexity: O(n) | ||
# Space complexity: O(n^2) | ||
def search(array, value) |
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.
👍 However the space/time complexity are both O(n^2)
# Time complexity: O(n) | ||
# Space complexity: O(n^2) | ||
def is_palindrome(s) |
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.
👍 However the space/time complexity are both O(n^2)
# Time complexity: O(n) | ||
# Space complexity: O(n^2) | ||
def helper_digit_match(n_string, m_string, matches) |
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.
👍 However the space/time complexity are both O(n^2)
No description provided.