public void ExistTest_NotExist() { var input = new char[3, 4] { { 'A', 'B', 'C', 'E' }, { 'S', 'F', 'C', 'S' }, { 'A', 'D', 'E', 'E' } }; var solution = new _079_WordSearch(); var result = solution.Exist(input, "ABCB"); Assert.IsFalse(result); }
public void ExistTest_Exist() { var input = new char[3, 4] { { 'A', 'B', 'C', 'E' }, { 'S', 'F', 'C', 'S' }, { 'A', 'D', 'E', 'E' } }; var solution = new _079_WordSearch(); var result = solution.Exist(input, "ABCCED"); Assert.True(result); }
public void ExistTest_NotExist() { var input = new char[3][] { new char[] { 'A', 'B', 'C', 'E' }, new char[] { 'S', 'F', 'C', 'S' }, new char[] { 'A', 'D', 'E', 'E' } }; var solution = new _079_WordSearch(); var result = solution.Exist(input, "ABCB"); Assert.IsFalse(result); }