From f6387c0b5a6ff684e261eaaf079d79dcec697e13 Mon Sep 17 00:00:00 2001 From: Aakash Panchal <51417248+Aakash-Panchal27@users.noreply.github.com> Date: Sun, 24 May 2020 00:54:24 +0530 Subject: [PATCH] Update Trie.md --- articles/Akash Articles/md/Trie.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/articles/Akash Articles/md/Trie.md b/articles/Akash Articles/md/Trie.md index a23d832..c449669 100644 --- a/articles/Akash Articles/md/Trie.md +++ b/articles/Akash Articles/md/Trie.md @@ -19,9 +19,11 @@ Trie is a very useful and special kind of data structure for string processing. Trie is a tree of nodes, where the specifications of a node can be given as below: Each node has, -1. An array of datatype `node` having the size of the alphabet(see the note below). +1. An array of size of the alphabet(see the note below). 2. A boolean variable. +**Note:** For an easy understanding purpose, we are assuming that all strings contain lowercase alphabet letters, i.e. `alphabet_size` is $26$. **We can convert characters to a number by using `c-'a'`, `c` is a lowercase character.** + **We will see usages of these two variables soon.** ```cpp @@ -41,8 +43,6 @@ struct trie_node }; ``` -**Note:** For an easy understanding purpose, we are assuming that all strings contain lowercase alphabet letters, i.e. `alphabet_size` is $26$. **We can convert characters to a number by using `c-'a'`, `c` is a lowercase character.** - ![enter image description here](https://github.com/KingsGambitLab/Lecture_Notes/blob/master/articles/Akash%20Articles/md/Images/Trie/3.png) Now, we have seen how a trie node looks like. Let's see how we are going to store strings in a trie using this kind of node.