Skip to content

Assignment 2#79

Closed
abeerkhe wants to merge 2 commits into
UofT-DSI:mainfrom
abeerkhe:assignment-2
Closed

Assignment 2#79
abeerkhe wants to merge 2 commits into
UofT-DSI:mainfrom
abeerkhe:assignment-2

Conversation

@abeerkhe
Copy link
Copy Markdown

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

  • [ x ] I can confirm that my changes are working as intended

@github-actions
Copy link
Copy Markdown

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.

@abeerkhe abeerkhe closed this Oct 20, 2025
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.

1 participant