News for hackers. Stuff that matters.
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.
Re:Simple Trie Implementation in C++11 by xorz57 on Sunday July 21, 2019 @05:25PM (#20493767)
Yes, indeed!