How can I keep two same string as two different one in policy based trie data structure ?

Правка en1, от Sukarna_Paul, 2019-08-06 07:18:35

I was solving a problem from spoj, Link. I need to keep two same string in the prefix_trie. For first query the answer 2, but I am getting 1. Because the duplicate is not counted. My code link . One more thing I want to how can I print the size of prefix range in O(1). Please Help.

Теги trie tree, policy based, #data structure

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Sukarna_Paul 2019-08-06 07:18:35 450 Initial revision (published)