Skip to content

Commit 8a6be3c

Browse files
authored
Merge pull request #220 from sir-gon/develop
[REFACTOR]
2 parents 53a68f2 + 367af3e commit 8a6be3c

File tree

7 files changed

+24
-127
lines changed

7 files changed

+24
-127
lines changed

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/arrays/ArraysLeftRotation.Test.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,9 @@ public class ArraysLeftRotationTest
88
{
99
public class ArraysLeftRotationsTestCase(List<int> input, int d_rotations, List<int> expected)
1010
{
11-
private List<int> input = input;
12-
private int d_rotations = d_rotations;
13-
private List<int> expected = expected;
14-
15-
public List<int> Input
16-
{
17-
get { return input; }
18-
}
19-
public int D_rotations
20-
{
21-
get { return d_rotations; }
22-
}
23-
public List<int> Expected
24-
{
25-
get { return expected; }
26-
}
11+
public List<int> Input { get; } = input;
12+
public int D_rotations { get; } = d_rotations;
13+
public List<int> Expected { get; } = expected;
2714
}
2815

2916
private List<ArraysLeftRotationsTestCase> testCases = default!;

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/arrays/CrushBruteForce.Test.cs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,10 @@ public class CrushBruteForceTest
88
{
99
public class CrushBruteForceTestCase(string title, List<List<int>> queries, int n, long expected)
1010
{
11-
private string title = title;
12-
private List<List<int>> queries = queries;
13-
private int n = n;
14-
private long expected = expected;
15-
public string Title
16-
{
17-
get { return title; }
18-
}
19-
public List<List<int>> Queries
20-
{
21-
get { return queries; }
22-
}
23-
public int N
24-
{
25-
get { return n; }
26-
}
27-
public long Expected
28-
{
29-
get { return expected; }
30-
}
11+
public string Title { get; } = title;
12+
public List<List<int>> Queries { get; } = queries;
13+
public int N { get; } = n;
14+
public long Expected { get; } = expected;
3115
}
3216

3317
private List<CrushBruteForceTestCase> testCases { get; set; } = default!;

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/arrays/CrushOptimized.Test.cs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,10 @@ public class CrushOptimizedTest
88
{
99
public class CrushOptimizedTestCase(string title, List<List<int>> queries, int n, long expected)
1010
{
11-
private string title = title;
12-
private List<List<int>> queries = queries;
13-
private int n = n;
14-
private long expected = expected;
15-
public string Title
16-
{
17-
get { return title; }
18-
}
19-
public List<List<int>> Queries
20-
{
21-
get { return queries; }
22-
}
23-
public int N
24-
{
25-
get { return n; }
26-
}
27-
public long Expected
28-
{
29-
get { return expected; }
30-
}
11+
public string Title { get; } = title;
12+
public List<List<int>> Queries { get; } = queries;
13+
public int N { get; } = n;
14+
public long Expected { get; } = expected;
3115
}
3216

3317
private List<CrushOptimizedTestCase> testCases { get; set; } = default!;

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/arrays/NewYearChaos.Test.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,9 @@ public class NewYearChaosTest
88
{
99
public class NewYearChaosTestCase(string title, int[] input, string expected)
1010
{
11-
private readonly string title = title;
12-
private readonly List<int> input = [.. input];
13-
private readonly string expected = expected;
14-
15-
public string Title
16-
{
17-
get { return title; }
18-
}
19-
20-
public List<int> Input
21-
{
22-
get { return input; }
23-
}
24-
25-
public string Expected
26-
{
27-
get { return expected; }
28-
}
11+
public string Title { get; } = title;
12+
public List<int> Input { get; } = [.. input];
13+
public string Expected { get; } = expected;
2914
}
3015

3116
private List<NewYearChaosTestCase> testCases { get; set; } = default!;

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/arrays/TwoDArray.Test.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,9 @@ public class TwoDArrayTest
88
{
99
public class TwoDArrayTestCase(string title, List<List<int>> input, long expected)
1010
{
11-
private string title = title;
12-
private List<List<int>> input = input;
13-
private long expected = expected;
14-
15-
public string Title
16-
{
17-
get { return title; }
18-
}
19-
public List<List<int>> Input
20-
{
21-
get { return input; }
22-
}
23-
public long Expected
24-
{
25-
get { return expected; }
26-
}
11+
public string Title { get; } = title;
12+
public List<List<int>> Input { get; } = input;
13+
public long Expected { get; } = expected;
2714
}
2815

2916
private List<TwoDArrayTestCase> testCases { get; set; } = default!;

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/greedy_algorithms/LuckBalance.Test.cs

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,10 @@ public class LuckBalanceTest
88
{
99
public class LuckBalanceTestCase(string title, int k, List<List<int>> contests, int expected)
1010
{
11-
private string title = title;
12-
private int k = k;
13-
private List<List<int>> contests = contests;
14-
private int expected = expected;
15-
16-
public string Title
17-
{
18-
get { return title; }
19-
}
20-
public int K
21-
{
22-
get { return k; }
23-
}
24-
public List<List<int>> Contests
25-
{
26-
get { return contests; }
27-
}
28-
public int Expected
29-
{
30-
get { return expected; }
31-
}
11+
public string Title { get; } = title;
12+
public int K { get; } = k;
13+
public List<List<int>> Contests { get; } = contests;
14+
public int Expected { get; } = expected;
3215
}
3316

3417
private List<LuckBalanceTestCase> testCases { get; set; } = default!;

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/greedy_algorithms/MinimumAbsoluteDifferenceInAnArray.Test.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,9 @@ public class MinimumAbsoluteDifferenceInAnArrayTest
88
{
99
public class MinimumAbsoluteDifferenceInAnArrayTestCase(string title, List<int> input, int expected)
1010
{
11-
private readonly string title = title;
12-
private readonly List<int> input = [.. input];
13-
private readonly int expected = expected;
14-
15-
public string Title
16-
{
17-
get { return title; }
18-
}
19-
public List<int> Input
20-
{
21-
get { return input; }
22-
}
23-
public int Expected
24-
{
25-
get { return expected; }
26-
}
11+
public string Title { get; } = title;
12+
public List<int> Input { get; } = [.. input];
13+
public int Expected { get; } = expected;
2714
}
2815

2916
private List<MinimumAbsoluteDifferenceInAnArrayTestCase> testCases { get; set; } = default!;

0 commit comments

Comments
 (0)