title: Tiers tree print all suffixed provied wrong output
body: <p>I need to print all suffixes of a tires tree. I am using following traverse method to print all suffixes.</p>
  
  <pre><code>struct TrieNode {
      struct TrieNode *children[ALPHABET_SIZE];
      char label;
      bool isLeaf;
  };
  
  void traverse(char prefix[], struct TrieNode *root) {
      concatenate_string(prefix, &amp;(root-&gt;label));
      if (root-&gt;isLeaf) {
          printf("%s\n", prefix);
      }
  
      for (int i = 0; i &lt; 26; i++) {
          if (root-&gt;children[i]) {
              traverse(prefix, root-&gt;children[i]);
          }
      }
  }
  </code></pre>
  
  <p>Consider following Trie tree</p>
  
  <pre><code>    Root
   |     |    |
   L     M    N
  |  |
  a  b 
  </code></pre>
  
  <p>So my expected output is </p>
  
  <pre><code>La
  Lb
  M
  N
  </code></pre>
  
  <p>But my code prints</p>
  
  <pre><code>  La
    Lab
    LabM
    LabMN
  </code></pre>
  
  <p>As per my understanding root cause for the issue is not updating prefix variable correctly. How to fix this issue? </p>