Esempio n. 1
0
 public void Example()
 {
     Assert.Equal(3, Q07.FindProductionSequenceLengthShortest(exampleWords, "cat", "dog"));
     Assert.Equal(new String[] { "cat", "cot", "dot", "dog" }, Q07.FindProductionSequenceShortest(exampleWords, "cat", "dog"));
 }
Esempio n. 2
0
 public void Helper_DiffByOneChar_Fail()
 {
     Assert.False(Q07.DiffByOneChar("abc", "abcd"));
     Assert.False(Q07.DiffByOneChar("abc", "axx"));
     Assert.False(Q07.DiffByOneChar("abc", "xxc"));
 }
Esempio n. 3
0
 public void Helper_BuildGraph()
 {
     var adjList = Q07.BuildGraphFromWordSet(exampleWords);
 }
Esempio n. 4
0
 public void Helper_DiffByOneChar()
 {
     Assert.True(Q07.DiffByOneChar("abc", "axc"));
     Assert.True(Q07.DiffByOneChar("abc", "xbc"));
     Assert.True(Q07.DiffByOneChar("abc", "abx"));
 }