Write an efficient C++ function that takes any integer value i and returns 2^i ,as a long value. Your function should not multiply 2 by itself i times; there are much faster ways of computing 2^i.
Optimized divide and conquer solution-
program-
output-
Get Answers For Free
Most questions answered within 1 hours.