It's obviously how to find such value using X-fast trie in O(w) complexity. But how can I modify Y-fast trie, to answer this question?
Terminology was used from here: link
If there are any usefull, interesting questions, which may be answered using trie, I'll be glad to read about them=)
Auto comment: topic has been translated by heesooyaam (original revision, translated revision, compare)