Documentation for 0c5c096991

This commit is contained in:
github-actions
2021-07-06 03:09:17 +00:00
parent 634b882918
commit 3699bfc270
210 changed files with 8458 additions and 8321 deletions

View File

@@ -146,7 +146,7 @@ Functions</h2></td></tr>
<p>for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> and <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></p>
<p>Mathematical algorithms</p>
<p>Given a recurrence relation; evaluate the value of nth term. For e.g., For fibonacci series, recurrence series is <code>f(n) = f(n-1) + f(n-2)</code> where <code>f(0) = 0</code> and <code>f(1) = 1</code>. Note that the method used only demonstrates recurrence relation with one variable (n), unlike <code>nCr</code> problem, since it has two (n, r)</p>
<h3><a class="anchor" id="autotoc_md67"></a>
<h3><a class="anchor" id="autotoc_md73"></a>
Algorithm</h3>
<p>This problem can be solved using matrix exponentiation method. </p><dl class="section see"><dt>See also</dt><dd>here for simple <a href="https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/modular_exponentiation.cpp">number exponentiation algorithm</a> or <a href="https://en.wikipedia.org/wiki/Exponentiation_by_squaring">explaination here</a>. </dd></dl>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/AshishYUO">Ashish Daulatabad</a> for assert for IO operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> STL</dd></dl>