Skip to content

Commit 46ca43f

Browse files
authored
Updated readme
1 parent 11e9d28 commit 46ca43f

File tree

11 files changed

+174
-147
lines changed

11 files changed

+174
-147
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
namespace LeetCodeNet.G0101_0200.S0129_sum_root_to_leaf_numbers {
22

3-
using Xunit;
4-
using System.Collections.Generic;
5-
using LeetCodeNet.Com_github_leetcode;
3+
using Xunit;
4+
using System.Collections.Generic;
5+
using LeetCodeNet.Com_github_leetcode;
66

7-
public class SolutionTest {
8-
[Fact]
9-
public void SumNumbers() {
10-
var treeNode = TreeNode.Create(new List<int?> {1, 2, 3});
11-
Assert.Equal(25, new Solution().SumNumbers(treeNode));
12-
}
7+
public class SolutionTest {
8+
[Fact]
9+
public void SumNumbers() {
10+
var treeNode = TreeNode.Create(new List<int?> {1, 2, 3});
11+
Assert.Equal(25, new Solution().SumNumbers(treeNode));
12+
}
1313

14-
[Fact]
15-
public void SumNumbers2() {
16-
var treeNode = TreeNode.Create(new List<int?> {4, 9, 0, 5, 1});
17-
Assert.Equal(1026, new Solution().SumNumbers(treeNode));
18-
}
14+
[Fact]
15+
public void SumNumbers2() {
16+
var treeNode = TreeNode.Create(new List<int?> {4, 9, 0, 5, 1});
17+
Assert.Equal(1026, new Solution().SumNumbers(treeNode));
1918
}
2019
}
20+
}
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
namespace LeetCodeNet.G0101_0200.S0130_surrounded_regions {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void Solve() {
8-
char[][] board = new char[][] {
9-
new char[] {'X', 'X', 'X', 'X'},
10-
new char[] {'X', 'O', 'O', 'X'},
11-
new char[] {'X', 'X', 'O', 'X'},
12-
new char[] {'X', 'O', 'X', 'X'}
13-
};
14-
new Solution().Solve(board);
15-
char[][] expected = new char[][] {
16-
new char[] {'X', 'X', 'X', 'X'},
17-
new char[] {'X', 'X', 'X', 'X'},
18-
new char[] {'X', 'X', 'X', 'X'},
19-
new char[] {'X', 'O', 'X', 'X'}
20-
};
21-
Assert.Equal(expected, board);
22-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void Solve() {
8+
char[][] board = new char[][] {
9+
new char[] {'X', 'X', 'X', 'X'},
10+
new char[] {'X', 'O', 'O', 'X'},
11+
new char[] {'X', 'X', 'O', 'X'},
12+
new char[] {'X', 'O', 'X', 'X'}
13+
};
14+
new Solution().Solve(board);
15+
char[][] expected = new char[][] {
16+
new char[] {'X', 'X', 'X', 'X'},
17+
new char[] {'X', 'X', 'X', 'X'},
18+
new char[] {'X', 'X', 'X', 'X'},
19+
new char[] {'X', 'O', 'X', 'X'}
20+
};
21+
Assert.Equal(expected, board);
22+
}
2323

24-
[Fact]
25-
public void Solve2() {
26-
char[][] board = new char[][] {new char[] {'X'}};
27-
new Solution().Solve(board);
28-
char[][] expected = new char[][] {new char[] {'X'}};
29-
Assert.Equal(expected, board);
30-
}
24+
[Fact]
25+
public void Solve2() {
26+
char[][] board = new char[][] {new char[] {'X'}};
27+
new Solution().Solve(board);
28+
char[][] expected = new char[][] {new char[] {'X'}};
29+
Assert.Equal(expected, board);
3130
}
3231
}
32+
}
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
namespace LeetCodeNet.G0101_0200.S0133_clone_graph {
22

3-
using Xunit;
4-
using System.Collections.Generic;
3+
using Xunit;
4+
using System.Collections.Generic;
55

6-
public class SolutionTest {
7-
[Fact]
8-
public void CloneGraph() {
9-
var node1 = new Node(1);
10-
var node2 = new Node(2);
11-
var node3 = new Node(3);
12-
var node4 = new Node(4);
13-
var node1and2and4 = new Node(1, new List<Node> {node2, node4});
14-
var node2and1and3 = new Node(2, new List<Node> {node1, node3});
15-
var node3and2and4 = new Node(3, new List<Node> {node2, node4});
16-
var node4and1and3 = new Node(4, new List<Node> {node1, node3});
17-
var node = new Node(5, new List<Node> {node1and2and4, node2and1and3, node3and2and4, node4and1and3});
18-
Assert.Equal("[[2,4],[1,3],[2,4],[1,3]]", new Solution().CloneGraph(node).ToString());
19-
}
6+
public class SolutionTest {
7+
[Fact]
8+
public void CloneGraph() {
9+
var node1 = new Node(1);
10+
var node2 = new Node(2);
11+
var node3 = new Node(3);
12+
var node4 = new Node(4);
13+
var node1and2and4 = new Node(1, new List<Node> {node2, node4});
14+
var node2and1and3 = new Node(2, new List<Node> {node1, node3});
15+
var node3and2and4 = new Node(3, new List<Node> {node2, node4});
16+
var node4and1and3 = new Node(4, new List<Node> {node1, node3});
17+
var node = new Node(5, new List<Node> {node1and2and4, node2and1and3, node3and2and4, node4and1and3});
18+
Assert.Equal("[[2,4],[1,3],[2,4],[1,3]]", new Solution().CloneGraph(node).ToString());
19+
}
2020

21-
[Fact]
22-
public void CloneGraph2() {
23-
var node1 = new Node(1);
24-
Assert.Equal("[]", new Solution().CloneGraph(node1).ToString());
25-
}
21+
[Fact]
22+
public void CloneGraph2() {
23+
var node1 = new Node(1);
24+
Assert.Equal("[]", new Solution().CloneGraph(node1).ToString());
25+
}
2626

27-
[Fact]
28-
public void CloneGraph3() {
29-
Assert.Null(new Solution().CloneGraph(null));
30-
}
27+
[Fact]
28+
public void CloneGraph3() {
29+
Assert.Null(new Solution().CloneGraph(null));
3130
}
3231
}
32+
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
namespace LeetCodeNet.G0101_0200.S0134_gas_station {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void CanCompleteCircuit() {
8-
Assert.Equal(3, new Solution().CanCompleteCircuit(new int[] {1, 2, 3, 4, 5}, new int[] {3, 4, 5, 1, 2}));
9-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void CanCompleteCircuit() {
8+
Assert.Equal(3, new Solution().CanCompleteCircuit(new int[] {1, 2, 3, 4, 5}, new int[] {3, 4, 5, 1, 2}));
9+
}
1010

11-
[Fact]
12-
public void CanCompleteCircuit2() {
13-
Assert.Equal(-1, new Solution().CanCompleteCircuit(new int[] {2, 3, 4}, new int[] {3, 4, 3}));
14-
}
11+
[Fact]
12+
public void CanCompleteCircuit2() {
13+
Assert.Equal(-1, new Solution().CanCompleteCircuit(new int[] {2, 3, 4}, new int[] {3, 4, 3}));
1514
}
1615
}
16+
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
namespace LeetCodeNet.G0101_0200.S0135_candy {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void Candy() {
8-
Assert.Equal(5, new Solution().Candy(new int[] {1, 0, 2}));
9-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void Candy() {
8+
Assert.Equal(5, new Solution().Candy(new int[] {1, 0, 2}));
9+
}
1010

11-
[Fact]
12-
public void Candy2() {
13-
Assert.Equal(4, new Solution().Candy(new int[] {1, 2, 2}));
14-
}
11+
[Fact]
12+
public void Candy2() {
13+
Assert.Equal(4, new Solution().Candy(new int[] {1, 2, 2}));
1514
}
1615
}
16+
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
namespace LeetCodeNet.G0101_0200.S0137_single_number_ii {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void SingleNumber() {
8-
Assert.Equal(3, new Solution().SingleNumber(new int[] {2, 2, 3, 2}));
9-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void SingleNumber() {
8+
Assert.Equal(3, new Solution().SingleNumber(new int[] {2, 2, 3, 2}));
9+
}
1010

11-
[Fact]
12-
public void SingleNumber2() {
13-
Assert.Equal(99, new Solution().SingleNumber(new int[] {0, 1, 0, 1, 0, 1, 99}));
14-
}
11+
[Fact]
12+
public void SingleNumber2() {
13+
Assert.Equal(99, new Solution().SingleNumber(new int[] {0, 1, 0, 1, 0, 1, 99}));
1514
}
1615
}
16+
}
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
namespace LeetCodeNet.G0101_0200.S0149_max_points_on_a_line {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void MaxPoints() {
8-
int[][] input = new int[][] {new int[] {1, 1}, new int[] {2, 2}, new int[] {3, 3}};
9-
Assert.Equal(3, new Solution().MaxPoints(input));
10-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void MaxPoints() {
8+
int[][] input = new int[][] {new int[] {1, 1}, new int[] {2, 2}, new int[] {3, 3}};
9+
Assert.Equal(3, new Solution().MaxPoints(input));
10+
}
1111

12-
[Fact]
13-
public void MaxPoints2() {
14-
int[][] input = new int[][] {new int[] {1, 1}, new int[] {3, 2}, new int[] {5, 3}, new int[] {4, 1}, new int[] {2, 3}, new int[] {1, 4}};
15-
Assert.Equal(4, new Solution().MaxPoints(input));
16-
}
12+
[Fact]
13+
public void MaxPoints2() {
14+
int[][] input = new int[][] {new int[] {1, 1}, new int[] {3, 2}, new int[] {5, 3}, new int[] {4, 1}, new int[] {2, 3}, new int[] {1, 4}};
15+
Assert.Equal(4, new Solution().MaxPoints(input));
1716
}
1817
}
18+
}
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
namespace LeetCodeNet.G0101_0200.S0150_evaluate_reverse_polish_notation {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void EvalRPN() {
8-
Assert.Equal(9, new Solution().EvalRPN(new string[] {"2", "1", "+", "3", "*"}));
9-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void EvalRPN() {
8+
Assert.Equal(9, new Solution().EvalRPN(new string[] {"2", "1", "+", "3", "*"}));
9+
}
1010

11-
[Fact]
12-
public void EvalRPN2() {
13-
Assert.Equal(6, new Solution().EvalRPN(new string[] {"4", "13", "5", "/", "+"}));
14-
}
11+
[Fact]
12+
public void EvalRPN2() {
13+
Assert.Equal(6, new Solution().EvalRPN(new string[] {"4", "13", "5", "/", "+"}));
14+
}
1515

16-
[Fact]
17-
public void EvalRPN3() {
18-
Assert.Equal(22, new Solution().EvalRPN(new string[] {
19-
"10", "6", "9", "3", "+", "-11", "*", "/", "*", "17", "+", "5", "+"
20-
}));
21-
}
16+
[Fact]
17+
public void EvalRPN3() {
18+
Assert.Equal(22, new Solution().EvalRPN(new string[] {
19+
"10", "6", "9", "3", "+", "-11", "*", "/", "*", "17", "+", "5", "+"
20+
}));
2221
}
2322
}
23+
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
namespace LeetCodeNet.G0101_0200.S0151_reverse_words_in_a_string {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void ReverseWords() {
8-
Assert.Equal("blue is sky the", new Solution().ReverseWords("the sky is blue"));
9-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void ReverseWords() {
8+
Assert.Equal("blue is sky the", new Solution().ReverseWords("the sky is blue"));
9+
}
1010

11-
[Fact]
12-
public void ReverseWords2() {
13-
Assert.Equal("world hello", new Solution().ReverseWords(" hello world "));
14-
}
11+
[Fact]
12+
public void ReverseWords2() {
13+
Assert.Equal("world hello", new Solution().ReverseWords(" hello world "));
14+
}
1515

16-
[Fact]
17-
public void ReverseWords3() {
18-
Assert.Equal("example good a", new Solution().ReverseWords("a good example"));
19-
}
16+
[Fact]
17+
public void ReverseWords3() {
18+
Assert.Equal("example good a", new Solution().ReverseWords("a good example"));
2019
}
2120
}
21+
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
namespace LeetCodeNet.G0101_0200.S0162_find_peak_element {
22

3-
using Xunit;
3+
using Xunit;
44

5-
public class SolutionTest {
6-
[Fact]
7-
public void FindPeakElement() {
8-
Assert.Equal(2, new Solution().FindPeakElement(new int[] {1, 2, 3, 1}));
9-
}
5+
public class SolutionTest {
6+
[Fact]
7+
public void FindPeakElement() {
8+
Assert.Equal(2, new Solution().FindPeakElement(new int[] {1, 2, 3, 1}));
9+
}
1010

11-
[Fact]
12-
public void FindPeakElement2() {
13-
Assert.Equal(5, new Solution().FindPeakElement(new int[] {1, 2, 1, 3, 5, 6, 4}));
14-
}
11+
[Fact]
12+
public void FindPeakElement2() {
13+
Assert.Equal(5, new Solution().FindPeakElement(new int[] {1, 2, 1, 3, 5, 6, 4}));
1514
}
1615
}
16+
}

0 commit comments

Comments
 (0)