Skip to content

Commit 15c1467

Browse files
authored
Update SolutionTest.kt
1 parent cb64f93 commit 15c1467

File tree

1 file changed

+13
-1
lines changed
  • src/test/kotlin/g0201_0300/s0235_lowest_common_ancestor_of_a_binary_search_tree

1 file changed

+13
-1
lines changed

src/test/kotlin/g0201_0300/s0235_lowest_common_ancestor_of_a_binary_search_tree/SolutionTest.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,17 @@ internal class SolutionTest {
4444
equalTo(2)
4545
)
4646
}
47-
//[6,2,8,0,4,7,9,null,null,3,5] 3 5 -> 4
47+
48+
@Test
49+
fun lowestCommonAncestor4() {
50+
assertThat(
51+
Solution()
52+
.lowestCommonAncestor(
53+
TreeNode.create(listOf(6, 2, 8, 0, 4, 7, 9, null, null, 3, 5)),
54+
TreeNode(3),
55+
TreeNode(5)
56+
)!!.`val`,
57+
equalTo(4)
58+
)
59+
}
4860
}

0 commit comments

Comments
 (0)