Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
[ad_1]
Given a quantity n, discover the dice root of n.
Examples:
Enter: n = 3 Output: Cubic Root is 1.442250 Enter: n = 8 Output: Cubic Root is 2.000000
We will use binary search. First we outline error e. Allow us to say 0.0000001 in our case. The principle steps of our algorithm for calculating the cubic root of a quantity n are:
Beneath is the implementation of above thought.
|
Output:
Cubic root of three.000000 is 1.442250
Time Complexity: O(logn)
Auxiliary House: O(1)
Please refer full article on Discover cubic root of a quantity for extra particulars!
[ad_2]