Assignment 2#79
Closed
abeerkhe wants to merge 2 commits into
Closed
Conversation
|
Hello, thank you for your contribution. If you are a participant, please close this pull request and open it in your own forked repository instead of here. Please read the instructions on your onboarding Assignment Submission Guide more carefully. If you are not a participant, please give us up to 72 hours to review your PR. Alternatively, you can reach out to us directly to expedite the review process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Answer Question 3 of Assignment 2, review my partner's code (Anna), analyze her code, and provide a reflection of that exercise and Assignment 1.
What did you learn from the changes you have made?
I learned to implement sets to compare expected values in two unordered lists (where output order and duplication is not required), and how to review and analyze somebody else's code.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I had a few approaches in mind that iterated over the input list in multiple ways (i.e., reordering the list and checking by list index, creating a 'range' from # of duplicate values to check within list for the existence of expected values [instead of iterating the whole list every time], etc.). Instead I opted to use sets as the data structure given the unique requirements of the problem which made it the most effective point of comparison by using the difference (
-) operator, reducing time complexity of the problem.Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
N/A - biggest challenge was finding the right operation to compare sets.
How were these changes tested?
Running the code and assessing the actual output against expected.
A reference to a related issue in your repository (if applicable)
N/A
Checklist