Skip to content

Commit 6acd78a

Browse files
committed
Apply code review
1 parent 9fd397b commit 6acd78a

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

config.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,8 +2735,16 @@
27352735
"slug": "relative-distance",
27362736
"name": "Relative Distance",
27372737
"uuid": "4f4229ce-5a2a-415c-a682-6a56cf3846ac",
2738-
"practices": [],
2739-
"prerequisites": [],
2738+
"practices": [
2739+
"constructors",
2740+
"dictionaries"
2741+
],
2742+
"prerequisites": [
2743+
"arrays",
2744+
"classes",
2745+
"constructors",
2746+
"dictionaries"
2747+
],
27402748
"difficulty": 5
27412749
},
27422750
{

exercises/practice/relative-distance/.meta/Example.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ public class RelativeDistance
22
{
33
private readonly Dictionary<string, HashSet<string>> relatives;
44

5-
public RelativeDistance(Dictionary<string, List<string>> familyTree)
5+
public RelativeDistance(Dictionary<string, string[]> familyTree)
66
{
77
Dictionary<string, HashSet<string>> parsed = new();
88
foreach (var (parent, children) in familyTree)

exercises/practice/relative-distance/RelativeDistance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
public class RelativeDistance
22
{
3-
public RelativeDistance(Dictionary<string, List<string>> familyTree)
3+
public RelativeDistance(Dictionary<string, string[]> familyTree)
44
{
55
throw new NotImplementedException("You need to implement this method.");
66
}

exercises/practice/relative-distance/RelativeDistanceTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ public class RelativeDistanceTests
33
[Fact]
44
public void Direct_parent_child_relation()
55
{
6-
var familyTree = new Dictionary<string, List<string>>
6+
var familyTree = new Dictionary<string, string[]>
77
{
88
{ "Aditi", ["Bao"] },
99
{ "Bao", ["Carlos"] },
@@ -16,7 +16,7 @@ public void Direct_parent_child_relation()
1616
[Fact(Skip = "Remove this Skip property to run this test")]
1717
public void Sibling_relationship()
1818
{
19-
var familyTree = new Dictionary<string, List<string>>
19+
var familyTree = new Dictionary<string, string[]>
2020
{
2121
{ "Dalia", ["Olga", "Yassin"] },
2222
};
@@ -27,7 +27,7 @@ public void Sibling_relationship()
2727
[Fact(Skip = "Remove this Skip property to run this test")]
2828
public void Two_degrees_of_separation_grandchild()
2929
{
30-
var familyTree = new Dictionary<string, List<string>>
30+
var familyTree = new Dictionary<string, string[]>
3131
{
3232
{ "Khadija", ["Mateo"] },
3333
{ "Mateo", ["Rami"] }
@@ -39,7 +39,7 @@ public void Two_degrees_of_separation_grandchild()
3939
[Fact(Skip = "Remove this Skip property to run this test")]
4040
public void Unrelated_individuals()
4141
{
42-
var familyTree = new Dictionary<string, List<string>>
42+
var familyTree = new Dictionary<string, string[]>
4343
{
4444
{ "Priya", ["Rami"] },
4545
{ "Kaito", ["Elif"] }
@@ -51,7 +51,7 @@ public void Unrelated_individuals()
5151
[Fact(Skip = "Remove this Skip property to run this test")]
5252
public void Complex_graph_cousins()
5353
{
54-
var familyTree = new Dictionary<string, List<string>>
54+
var familyTree = new Dictionary<string, string[]>
5555
{
5656
{ "Aiko", ["Bao", "Carlos"] },
5757
{ "Bao", ["Dalia", "Elias"] },
@@ -113,7 +113,7 @@ public void Complex_graph_cousins()
113113
[Fact(Skip = "Remove this Skip property to run this test")]
114114
public void Complex_graph_far_removed_nephew()
115115
{
116-
var familyTree = new Dictionary<string, List<string>>
116+
var familyTree = new Dictionary<string, string[]>
117117
{
118118
{ "Mina", ["Viktor", "Wang"] },
119119
{ "Olga", ["Yuki"] },
@@ -175,7 +175,7 @@ public void Complex_graph_far_removed_nephew()
175175
[Fact(Skip = "Remove this Skip property to run this test")]
176176
public void Complex_graph_cousins_several_times_removed()
177177
{
178-
var familyTree = new Dictionary<string, List<string>>
178+
var familyTree = new Dictionary<string, string[]>
179179
{
180180
{ "Mina", ["Viktor", "Wang"] },
181181
{ "Olga", ["Yuki"] },

0 commit comments

Comments
 (0)