Recursion and Recursive Functions in C++. Recursive function is a function that calls itself. In this video we will go over how to traverse through a vector in a recursive function. First we would need a base case which is usually when the index reaches out of bounds (index == size). Then we need to create a recursive step which is the index. With each recursive call, we pass index + 1, which increments the index towards the base case (index == size).
If you need to review these topics:
Functions: https://youtu.be/65PSQUdH5k0
Pass by Value vs Reference: https://youtu.be/77XcoXwoK2c
Function Overloading: https://youtu.be/tJPHWF1PboY
Const Reference: https://youtu.be/aP_VwBrPrJw
Templates and Generics: https://youtu.be/8IgXzTNgQdo
Recursion: https://youtu.be/z588uicHgJM
C++ Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4ZDNIOZ51sX25pWKQ1pkpTE
Github Repo for C++ Code:
https://github.com/ImKennyYip/cpp
Install C++ with VS Code:
https://youtu.be/DMWD7wfhgNY
Subscribe for more coding tutorials !