Skip to content

Conversation

@iris-lux
Copy link

@iris-lux iris-lux commented Nov 3, 2020

No description provided.

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.

Nice work Iris, you hit the learning goals here. Well done. Take a look at my comments and let me know what questions you have.

Comment on lines +3 to 5
# Time complexity: O(n), where n is size of number
# Space complexity: O(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 +15 to 18
# Time complexity: 0(n^2) where n is length od string
# Space complexity: 0(n^2) where n is length of string

def reverse(s)

Choose a reason for hiding this comment

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

👍

Comment on lines +24 to +26
# Time complexity: o(n) where n is length of string
# Space complexity: o(n)
def reverse_inplace(s, first = 0, last = s.length - 1)

Choose a reason for hiding this comment

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

👍

Comment on lines +33 to 35
# Time complexity: O(n) where n is size of number
# Space complexity: O(n)
def bunny(n)

Choose a reason for hiding this comment

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

👍

Comment on lines +41 to +44
# Time complexity: o(n) where n is length of string
# Space complexity: o(n)

def nested(s, first = 0, sub_length = s.length)

Choose a reason for hiding this comment

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

👍

Comment on lines +54 to +57
# Time complexity: O(n) where n is length of array
# Space complexity: O(n)

def search(array, value, i = 0)

Choose a reason for hiding this comment

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

👍

Comment on lines +65 to +68
# Time complexity: O(n) where n is the length of string
# Space complexity: O(n) where n is the length of string
#
def is_palindrome(s, first = 0, sub_length = s.length)

Choose a reason for hiding this comment

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

👍

Comment on lines +77 to +79
# Time complexity: O(logn) where n is the largest number
# Space complexity: O(logn)
def digit_match(n, m, count = 0)

Choose a reason for hiding this comment

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

👍

# Space complexity: ?
def is_palindrome(s)
raise NotImplementedError, "Method not implemented"
def fib(n)

Choose a reason for hiding this comment

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

Time & space complexity?

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