Replace every element of the array by product of all other elements
For example : Consider an array as shown below
If you want to implement the above logic using O(n) space, you can do it only using recursion.
Solution can be found at
https://www.techiedelight.com/replace-element-array-product-every-element-without-using-division-operator/
Recursion tree is as follows
No comments:
Post a Comment