-
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
Fire-Blaine #46
base: master
Are you sure you want to change the base?
Fire-Blaine #46
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.
Blaine, the methods you have work, I did leave some comments regarding space/time complexity.
If you have questions about the others, let me know.
# Time complexity: O(n) | ||
# Space complexity: 0(n) | ||
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.
👍
# 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.
👍 However the time complexity is O(n^2)
# Time complexity: O(n) | ||
# Space complexity: O(n) | ||
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.
👍
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 you did finish Blaine work and work well. I did have some comments on space/time complexity. Otherwise take a look at my comments and let me know if you have questions.
# raise NotImplementedError, "Method not implemented" | ||
|
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 this:
# raise NotImplementedError, "Method not implemented" | |
return 0 if n == 0 | |
return 2 + bunny(n - 1) |
W.I.P.