Блог пользователя Lvl_Insane

Автор Lvl_Insane, история, 13 месяцев назад, По-английски

Hello Codeforces Community!

This is my first ever blog on Codeforces and I’m super excited to be here!

Please read this before proceeding
The purpose of this blog
The Story Behind This Blog

This blog focuses on providing an implementation of the Trie data structure in C++ without using pointers.

After spending time exploring and experimenting, here is the Trie template I came up with. It's designed to be clean, efficient, and adheres to modern C++ practices.

Trie
Bit_Trie
Note

Video Tutorials on Trie

Here are some additional templates I have created that you may find useful:

Macros used in below templates
Debug
Linear_Sieve
Binary_Exponentiation
Combinations_Number_Theory
Dijkstra
Disjoint_Set_Union
Minimum_Spanning_Tree
Z_Function

"I may add more templates in the future, if feasible."

This Probably Won’t Impress You

Thanks for stopping by, and feel free to drop a comment or suggestion. Happy coding!

  • Проголосовать: нравится
  • +37
  • Проголосовать: не нравится

»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

To be honest, I have never coded Trie with pointers.

And that must be the reason I can't get my rating better! I have no template to use and every time I'm typing a new one

»
13 месяцев назад, скрыть # |
Rev. 5  
Проголосовать: нравится +5 Проголосовать: не нравится

Try to use template to allow more type of chars.

Here is a sample of trie template that allow all type of chars.

Allow std::map or std::unordered_map for sons' index-based pointer container.

My template

Allow array for sons' index-based pointer container.

My template
»
13 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

This is really helpful !!