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

Kelly Souza Restricted Array #4

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

Conversation

kellysouza
Copy link

Restricted Array

Congratulations! You're submitting your assignment.

Comprehension Questions

What is the time and space complexity for each method you implemented? Provide justification.

Question Answer
What is the time complexity of the length method? Provide justification.
What is the space complexity of the length method? Provide justification.
What is the time complexity of the print_array method? Provide justification.
What is the space complexity of the print_array method? Provide justification.
What is the time complexity of the reverse method? Provide justification.
What is the space complexity of the reverse method? Provide justification.
What is the time complexity of the search method? Provide justification.
What is the space complexity of the search method? Provide justification.
What is the time complexity of the delete method? Provide justification.
What is the space complexity of the delete method? Provide justification.
What is the time complexity of the empty method? Provide justification.
What is the space complexity of the empty method? Provide justification.
What is the time complexity of the find_largest method? Provide justification.
What is the space complexity of the find_largest method? Provide justification.
What is the time complexity of the insert_ascending method? Provide justification.
What is the space complexity of the insert_ascending method? Provide justification.

i += 1
else
another_element = false
if array[i] != SPECIAL_VALUE
Copy link
Collaborator

Choose a reason for hiding this comment

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

SPECIAL_VALUEs count towards length. They are just unused spaces. The size of an array doesn't change once created.

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