Trie Solution Carol Zander (CSS 343) ------------- 1. Build a trie with the following words: pan pant pane pain paint painter Array elements showing nothing inside actually have nullptr in them. An X in the last position means the pointer is not nullptr, that the word is in the dictionary. a b c d e p z $ +--+--+--+--+--+------+---+-----+--+--+ -->| | | | | | ... | | ... | | | +--+--+--+--+--+------+-/-+-----+--+--+ / +---------+ | a | +---+--+--+--+--+---------------+--+--+ +-->| | | | | | ... | | | +-/-+--+--+--+--+---------------+--+--+ / +---+ | i n | +-------+---+-------+---+--------+--+ +-->| ... | | ... | | ... | | +-------+-/-+-------+-/-+--------+--+ / / +--------------------------+ +---+ | n | e t | +----------+---+--------+--+ | +-----+---+-------+---+-----+---+ +-->| ... | | ... | | +-->| ... | | ... | | ... | X | +----------+-/-+--------+--+ +-----+-/-+-------+-/-+-----+---+ / / / +---------------+ +----------------+ +-----+ | t | | | +-------+---+---+---+ | +---------+---+ | +---------+---+ +-->| ... | |...| X | +-->| ... | X | +-->| ... | X | +-------+-/-+---+---+ +---------+---+ +---------+---+ / / +--------+ | e | +-------+---+---+---+ +-->| ... | |...| X | +-------+-/-+---+---+ / / +-------+ | r | +---------+---+-----+--+ +-->| ... | | ... | | +---------+-/-+-----+--+ / / +------------+ | | +------------------+---+ +-->| ... | X | +------------------+---+