As part of a regulatory process, a government agency wants to determine whether an applicant is eligible for a resident permit using a simple rule: an applicant is eligible if, while married, the applicant and their spouse have shared the same address for at least 7 of the last 10 years.
Example input data:
Applicant’s address history (From, To, Address):
- 2010-01-01 to 2015-12-31, “123 Main St”
- 2016-01-01 to 2020-12-31, “456 Oak St”
- 2021-01-01 to 2023-03-04, “789 Elm St”
Spouse’s address history (From, To, Address):
- 2010-01-01 to 2015-12-31, “123 Main St”
- 2016-01-01 to 2020-12-31, “120 Maple St”
- 2021-01-01 to 2023-03-04, “789 Elm St”
Marriage periods (From, To):
- 2010-01-01 to 2015-12-31
- 2021-01-01 to 2023-03-04
Send your solutions to DecisionManagementCommunity@gmail.com, or open a pull request to add yours here.