I am confused as to how the Trie implementation saves space & stores data in most compact form!
If you look at the tree below. When you store a character at any nod
It's not about cheap space in memory, it's about precious space in a file or on a communications link. With an algorithm that builds that trie, we can send 'ten' in three bits, left-right-right. Compared to the 24 bits 'ten' would take up uncompressed, that's a huge savings of valuable disk space or transfer bandwidth.