Skip to content

Fire-Blaine#46

Open
Blaine206 wants to merge 1 commit intoAda-C14:masterfrom
Blaine206:master
Open

Fire-Blaine#46
Blaine206 wants to merge 1 commit intoAda-C14:masterfrom
Blaine206:master

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