Link to gfg: Trie Data Structure using smart pointer
I came across this implementation of Trie Data Structure using shared pointers. But I don't understand the purpose of using shared pointers.
Can we not simply use unique pointers here?
Link to gfg: Trie Data Structure using smart pointer
I came across this implementation of Trie Data Structure using shared pointers. But I don't understand the purpose of using shared pointers.
Can we not simply use unique pointers here?