Skip to content

Commit

Permalink
Added Trie (Prefix Tree)
Browse files Browse the repository at this point in the history
  • Loading branch information
jade-42 committed Sep 26, 2017
1 parent 6e52f45 commit 2e77539
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,18 @@ <h2 style="page-break-before: always;" id="data-structures">Common Data Structur
<td><code class="bigo-bad">O(n)</code></td>
<td><code class="bigo-bad">O(n)</code></td>
</tr>
<tr>
<td><a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie (Prefix Tree)</a></td>
<td><code class="bigo-ok">O(M)</code></td>
<td><code class="bigo-great">O(M)</code></td>
<td><code class="bigo-great">O(M)</code></td>
<td><code class="bigo-great">O(M)</code></td>

<td><code class="bigo-ok">O(M)</code></td>
<td><code class="bigo-ok">O(M)</code></td>
<td><code class="bigo-ok">O(M)</code></td>
<td><code class="bigo-ok">O(M)</code></td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/Binary_search_tree" target="_blank">Binary Search Tree</a></td>
<td><code class="bigo-ok">O(log(n))</code></td>
Expand Down Expand Up @@ -449,6 +461,7 @@ <h2 style="page-break-before: always;" id="data-structures">Common Data Structur
</div>

<p class="no-print"><span class="uk-badge">Note</span> * All have space complexity of O(n) except for Skip that has O(n log(n))</p>
<p class="no-print"><span class="uk-badge">Where</span> M is the length of a key.</p>

<hr class="uk-grid-divider"><div class="page-break"></div>

Expand Down

0 comments on commit 2e77539

Please sign in to comment.