https://m7madmomani2.github.io/reading-notes2
- TDD means Test-driven development which means the kind of development were you stick lots of step by step tests called unit tests
- Unit tests are some pieces of code to exercise the input, the output and the behaviour of your code. You can write them anytime you want.
- The greatest advantage about TDD is to craft the software design first
- Your code will be more reliable: after a change you can run your tests and be in peace
The process in which a function calls itself directly or indirectly
the solution to the base case is provided and the solution of the bigger problem is expressed in terms of smaller problems.
represent a problem in smaller problems, and add conditions that stop the recursion.
- It is called direct when the function calls itself within it , And it is called indirect when the function calles another new functions that calls the same function again
- The recursive program has greater space requirements than iterative program as all functions will remain in the stack until the base case is reached.
- Recursion provides a clean and simple way to write code.