Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fire-Blaine #46

wants to merge 1 commit into from

Conversation

Blaine206
Copy link

W.I.P.

Copy link

@CheezItMan CheezItMan left a 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.

Comment on lines +3 to 5
# Time complexity: O(n)
# Space complexity: 0(n)
def factorial(n)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +17 to 19
# Time complexity: ? O(n)
# Space complexity: O(n)^2
def reverse(s)

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)

Comment on lines +28 to 30
# Time complexity: O(n)
# Space complexity: O(n)
def reverse_inplace(s)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@CheezItMan CheezItMan left a 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.

Comment on lines +48 to +49
# raise NotImplementedError, "Method not implemented"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this:

Suggested change
# raise NotImplementedError, "Method not implemented"
return 0 if n == 0
return 2 + bunny(n - 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants