diff --git a/exercises/relative-distance/instructions.md b/exercises/relative-distance/instructions.md index 91dd5762b..9046aee7c 100644 --- a/exercises/relative-distance/instructions.md +++ b/exercises/relative-distance/instructions.md @@ -1,6 +1,7 @@ # Instructions Your task is to determine the degree of separation between two individuals in a family tree. +This is similar to the pop culture idea that every Hollywood actor is [within six degrees of Kevin Bacon][six-bacons]. - You will be given an input, with all parent names and their children. - Each name is unique, a child _can_ have one or two parents. @@ -13,22 +14,21 @@ Your task is to determine the degree of separation between two individuals in a Given the following family tree: ```text - ┌──────────┐ ┌──────────┐ ┌───────────┐ - │ Helena │ │ Erdős │ │ Shusaku │ - └───┬───┬──┘ └─────┬────┘ └──────┬────┘ - ┌───┘ └───────┐ └──────┬──────┘ - ▼ ▼ ▼ -┌──────────┐ ┌────────┐ ┌──────────┐ -│ Isla │ │ Tariq │ │ Kevin │ -└────┬─────┘ └────┬───┘ └──────────┘ - ▼ ▼ -┌─────────┐ ┌────────┐ + ┌──────────┐ ┌──────────┐ ┌───────────┐ + │ Helena │ │ Erdős ├─────┤ Shusaku │ + └───┬───┬──┘ └─────┬────┘ └────┬──────┘ + ┌───┘ └───────┐ └───────┬───────┘ +┌─────┴────┐ ┌────┴───┐ ┌─────┴────┐ +│ Isla ├─────┤ Tariq │ │ Kevin │ +└────┬─────┘ └────┬───┘ └──────────┘ + │ │ +┌────┴────┐ ┌────┴───┐ │ Uma │ │ Morphy │ └─────────┘ └────────┘ ``` -The degree of separation between Tariq and Uma is 3 (Tariq → Helena → Isla → Uma). -There's no known relationship between Isla and [Kevin][six-bacons], as there is no connection in the given data. +The degree of separation between Tariq and Uma is 2 (Tariq → Isla → Uma). +There's no known relationship between Isla and Kevin, as there is no connection in the given data. The degree of separation between Uma and Isla is 1. ~~~~exercism/note