3 ms·
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.
by psurge 7y ago
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.
- xorz57 7y agoYes, indeed!