我不断收到我的加载函数的段错误。 bool load(const char *dictionary)
{
//create a trie data type
typedef struct node
{
bool is_word;
struct node *children[27]; //this is a pointer too!
我写了这段代码来测试前缀树,但由于某种原因,我得到错误“TrieNode”对象不可调用。有人能帮我解决这个错误吗? 为什么TrieNode()类不可调用? # Prefix Tree or Trie Data Structure
class TrieNode(object):
def __init__(self):
self.children = {}
self