Skip to content

Commit 615306d

Browse files
authored
Relative distance fix (#2566)
* Link horizontally between siblings, no arrows * Describe why Kevin Bacon is referred * Specific group of people around Kevin Bacon
1 parent 351265b commit 615306d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

exercises/relative-distance/instructions.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Instructions
22

33
Your task is to determine the degree of separation between two individuals in a family tree.
4+
This is similar to the pop culture idea that every Hollywood actor is [within six degrees of Kevin Bacon][six-bacons].
45

56
- You will be given an input, with all parent names and their children.
67
- 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
1314
Given the following family tree:
1415

1516
```text
16-
┌──────────┐ ┌──────────┐ ┌───────────┐
17-
│ Helena │ │ Erdős │ │ Shusaku │
18-
└───┬───┬──┘ └─────┬────┘ └──────┬────┘
19-
┌───┘ └───────┐ └──────┬──────┘
20-
▼ ▼ ▼
21-
┌──────────┐ ┌────────┐ ┌──────────┐
22-
│ Isla │ │ Tariq │ │ Kevin │
23-
└────┬─────┘ └────┬───┘ └──────────┘
24-
▼ ▼
25-
┌─────────┐ ┌────────┐
17+
┌──────────┐ ┌──────────┐ ┌───────────┐
18+
│ Helena │ │ Erdős ├─────┤ Shusaku │
19+
└───┬───┬──┘ └─────┬────┘ └────┬──────┘
20+
┌───┘ └───────┐ └───────┬───────┘
21+
┌─────┴────┐ ┌────┴───┐ ┌─────┴────┐
22+
│ Isla ├─────┤ Tariq │ │ Kevin │
23+
└────┬─────┘ └────┬───┘ └──────────┘
24+
│ │
25+
┌────┴────┐ ┌────┴───┐
2626
│ Uma │ │ Morphy │
2727
└─────────┘ └────────┘
2828
```
2929

30-
The degree of separation between Tariq and Uma is 3 (Tariq → Helena → Isla → Uma).
31-
There's no known relationship between Isla and [Kevin][six-bacons], as there is no connection in the given data.
30+
The degree of separation between Tariq and Uma is 2 (Tariq → Isla → Uma).
31+
There's no known relationship between Isla and Kevin, as there is no connection in the given data.
3232
The degree of separation between Uma and Isla is 1.
3333

3434
~~~~exercism/note

0 commit comments

Comments
 (0)