Let's consider a binary search tree. Using the "delete" operation, we sequentially remove vertices 8, 4 and 10. Print the path that connects vertices 5 and 11.
Input example: 5 4 6 8 10 11.
Let's consider a binary search tree. Using the "delete" operation, we sequentially remove vertices 8, 4 and 10. Print the path that connects vertices 5 and 11.
Input example: 5 4 6 8 10 11.
Create a free account to access the full topic