<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Hybrid algorithm - Page 5 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=hybrid_algorithm&amp;p=4">1.Previous</a><br />
<a accesskey="3" href="page.php?w=hybrid_algorithm&amp;p=6">3.Next</a>
</p>
<p><a href="page.php?w=binary_search">binary search</a>) in the merging logic.</p>

<p>A general procedure for a simple hybrid recursive algorithm is short-circuiting the base case, also known as <a href="page.php?w=arm%27s-length_recursion">arm's-length recursion</a>. In this case whether the next step will result in the base case is checked before the function call, avoiding an unnecessary function call. For example, in a tree, rather than recursing to a child node and then checking if it is null, checking null before recursing. This is useful</p><p>
<a accesskey="1" href="page.php?w=hybrid_algorithm&amp;p=4">1.Previous</a><br />
<a accesskey="3" href="page.php?w=hybrid_algorithm&amp;p=6">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
