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

Implemented Restricted Array/ used C# #12

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

Conversation

RanaSulaiman
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.

}
}

public void search(int target)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The logic is correct. However, the specifications ask you to return true or false based on whether the value is found. So instead of returning void, return bool. true if found, `false otherwise, without printing anything to the console.

@shrutivanw
Copy link
Collaborator

I added a couple of comments inline in the code. You didn't fill out the PR template. When you get a chance, share with me over slack the time and space complexity for each of the methods you were asked to implement as part of the assignment.

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.

3 participants