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

Sockets - Tatiana #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Sockets - Tatiana #33

wants to merge 4 commits into from

Conversation

tatsqui
Copy link

@tatsqui tatsqui commented Apr 11, 2019

No description provided.

# Time complexity: ?
# Space complexity: ?
# Time complexity: On!
# Space complexity: Constant

Choose a reason for hiding this comment

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

Make sure to explain your reasoning behind time and space complexity.

def factorial(number)
raise NotImplementedError
end
raise ArgumentError, "Bad Value" if number == nil

Choose a reason for hiding this comment

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

If you want to also cover bad string integer input, consider:
raise ArgumentError, "Bad Value" if number.is_a?(Integer) == false || number == nil

number *= minus_one
minus_one -= 1
end
return number

Choose a reason for hiding this comment

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

Nice work on this method! 🦄 👍

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