Codeforces и Polygon могут быть недоступны в период с 23 мая, 7:00 (МСК) по 23 мая, 11:00 (МСК) в связи с проведением технических работ. ×
DON'T use std::unordered_map for Trie
Разница между en1 и en2, 215 символ(ов) изменены
Hey everyone, I was solving [this](https://www.hackerearth.com/practice/data-structures/advanced-data-structures/trie-keyword-tree/practice-problems/algorithm/xor-and-insert-92b9b529/) trie problem. At first, I was trying to solve this using std::unordered_map which causes TLE, but then, I tried using static array, and then it worked fine.↵

Solution with std::unordered_map: 
([link](https://pastebin.com/LtLQ47fk)) https://pastebin.com/LtLQ47fk↵

<spoiler summary="Spoiler">↵
FDF↵
DFDF↵
DFDF↵
DF↵
DFD↵
F↵
</spoiler>↵

Solution using static array: ([link](https://pastebin.com/BUDPhxXk)) https://pastebin.com/BUDPhxXk


Is there is any way to optimize the std::unordered_map?↵

Is there any mistake in the unordered_map solution?↵

Is there something wrong?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Naithani 2020-05-07 16:55:26 215 Tiny change: ' solution?' -> ' solution?\n\nIs there something wrong?' (published)
en1 Английский Naithani 2020-05-07 16:48:39 657 Initial revision (saved to drafts)