r/codinginterview • • May 13 '20

Even Number using Recursion

  • Implement iteratively without using % operator

  • Time and space complexity

    • Iterative Solution

    • Using multiply and divide

  • Recursion diagram

  • Recursive solution

  • Fixing stack overflow error

  • Reduction step

  • Trivial combine step

  • Tail recursion

  • Two base cases

  • How many base cases are required?

  • Time and space complexity

  • Linear recursion

https://www.youtube.com/watch?v=P-mP_VWKuUI&feature=share

2 Upvotes

0 comments sorted by