Skip to content

Conversation

@truggeri
Copy link
Owner

Summary

Day 1

Easily adjust the algorithm to compare against seen result. To save time, iterate over right list and store results in a map to make future lookups O(1).

Day 2

Implement a tolerance variable that can handle finding a violation. The trick was how to determine if the input set can handle removing a value. This was implemented with a recursive call, removing one from the tolerance and one element from the original input. Lots of simple unit tests were added to make this process easier to reason about.

@truggeri truggeri self-assigned this Dec 28, 2024
@truggeri truggeri merged commit 1370b65 into main Dec 28, 2024
1 check passed
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