- Background Calculation An Exponential No Can Be Done Using Iteration By Multiplying A Number Repeatedly However Thi 1 (33.25 KiB) Viewed 19 times
Background: Calculation an exponential, nº, can be done using iteration by multiplying a number repeatedly. However, thi
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Background: Calculation an exponential, nº, can be done using iteration by multiplying a number repeatedly. However, thi
Background: Calculation an exponential, nº, can be done using iteration by multiplying a number repeatedly. However, this problem can also be solved using recursion and in a more efficient way, specifically O(log(n)). Remember your exponent rules, specially nº x n = nota Problem: You need to write a recursive algorithm that evaluates an exponential in O(log(n)) time. It should take two numbers n and p and return the result of nº. input: n, p: Integer values representing an exponential. output: the evaluated value of the exponential // Your pseudo code here