Problem 2689 · Medium

Extract Kth Character From The Rope Tree

Walk down a rope tree by comparing the index with stored left-subtree lengths, so the whole string is never built.

Open the interactive visualisation