2689. Extract Kth Character From The Rope Tree
TreeDepth-First SearchBinary Tree
Hints
Hint 1
Think of recursive methods.
Hint 2
Write a recursive function that gives a node of the tree and returns S[node].
Hint 3
Call the function above on the root of the tree and get k-th character of it.
Preparing judge…