Quantcast
Channel: Trie implementation using std::shared_ptr - Code Review Stack Exchange
Browsing latest articles
Browse All 2 View Live

Answer by G. Sliepen for Trie implementation using std::shared_ptr

Use std::unique_ptr instead of std::shared_ptrYou are never sharing your std::shared_ptrs, so it is much better to use std::unique_ptr instead. std::unique_ptr uses less memory and is more...

View Article



Trie implementation using std::shared_ptr

I've implemented a basic Trie that is supposed to work only with lowercase English letters.class TrieNode {public: array<shared_ptr<TrieNode>, 26> children; bool isWord; TrieNode(bool...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images