Re:Simple Trie Implementation in C++11
by psurge on Sunday July 21, 2019 @04:47PM
(#20493554)
Aren't the second and third lines of the insert/search implementations superfluous? Casting root to a boolean will never return false, since it is initialized. The insert implementation doesn't update root, so if root were nullptr, insert would be throwing away its work.
[ Parent
| on HN ]