Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions Tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,56 @@ <h2 id="sorting">Array Sorting Algorithms</h2>
</tr>

</table>

<h2 id="sorting">Array Searching Algorithms</h2>
<table class="table table-bordered table-striped">
<tr>
<th>Algorithm</th>
<th colspan="3">Time Complexity</th>
<th>Space Complexity</th>
</tr>
<tr>
<th></th>
<th>Best</th>
<th>Average</th>
<th>Worst</th>
<th>Worst</th>
</tr>

<tr>
<td><a href="https://en.wikipedia.org/wiki/Linear_search">Linear Search</a></td>
<td><code class="yellow">O(1)</code></td>
<td><code class="yellow">O(n)</code></td>
<td><code class="yellow">O(n)</code></td>
<td><code class="green">O(1)</code></td>
</tr>
<tr>
<td><a href="https://en.wikipedia.org/wiki/Binary_search">Binary Search</a></td>
<td><code class="orange">O(1)</code></td>
<td><code class="orange">O(log(n))</code></td>
<td><code class="orange">O(log(n))</code></td>
<td><code class="green">O(1)</code></td>
</tr>
<tr>
<td><a href="https://en.wikipedia.org/wiki/Ternary_search">Ternary Search</a></td>
<td><code class="orange">O(1)</code></td>
<td><code class="orange">O(log3(n))</code></td>
<td><code class="orange">O(log3(n))</code></td>
<td><code class="green">O(1)</code></td>
</tr>
<tr>
<td><a href="https://en.wikipedia.org/wiki/Jump_search">Jump Search</a></td>
<td><code class="orange">O(√n)</code></td>
<td><code class="orange">O(√n)</code></td>
<td><code class="orange">O(√n)</code></td>
<td><code class="green">O(1)</code></td>
</tr>
<tr>
<td><a href="https://en.wikipedia.org/wiki/Exponential_search">Exponential Search</a></td>
<td><code class="orange">O(1)</code></td>
<td><code class="orange">O(log(n))</code></td>
<td><code class="orange">O(log(n))</code></td>
<td><code class="green">O(1)</code></td>
</tr>
</table>