r/codinginterview • u/bparanj • May 12 '20
Remainder using Recursion
Deriving equation to solve a problem
Time complexity for equation based implementation
Solving the problem by hand (brute force)
Solving the problem by translating manual steps to iterative code
Recognizing nothing to be done in combine step using recursion diagram
Trivial combine step in recursion leads to tail recursion
Comparison of iterative and recursive solution to see how terminating condition maps to base case, result and reduced value are the same in this case
2
Upvotes
1
u/bparanj May 12 '20
Download the PDF of the lesson : https://drive.google.com/open?id=1d8wW2qaSUFypWug0MJOA861ocxVFjrCP