mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-24 05:42:59 +08:00
Documentation for f7a5aecce5
This commit is contained in:
@@ -145,7 +145,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_md76"></a>
|
||||
<h3><a class="anchor" id="autotoc_md77"></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" target="_blank">number exponentiation algorithm</a> or <a href="https://en.wikipedia.org/wiki/Exponentiation_by_squaring" target="_blank">explaination here</a>. </dd></dl>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/AshishYUO" target="_blank">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>
|
||||
|
||||
Reference in New Issue
Block a user