Count The Occurrences Of A Value In An Array Using Recursion | C Programming Example

Поділитися
Вставка
  • Опубліковано 19 жов 2024
  • How to count the occurrences of a value in an array using recursion in C. Source code: github.com/por.... Check out www.portfolioc... to build a portfolio that will impress employers!

КОМЕНТАРІ • 7

  • @danholm99
    @danholm99 3 місяці тому +1

    good video and very instructive and well explained....thank you very much !

    • @PortfolioCourses
      @PortfolioCourses  3 місяці тому +1

      You're welcome, I'm glad you enjoyed it! :-)

  • @SebastianBeckerPhoto
    @SebastianBeckerPhoto 3 місяці тому

    Great explanation of recursion. The question would be though, why would anyone use recursion for this problem, something that is hard to read for a third party, when one can use a simple for loop.

    • @PortfolioCourses
      @PortfolioCourses  3 місяці тому

      Recursion has some practical use cases when working with tree/graph data structures, and sometimes it can just be a clearer way of expressing an algorithm. But for problems like this it's really just an exercise to help learners think through and solve problems, like how problems in math are sometimes just made up for fun and practice with no practical use. :-)

  • @briman113
    @briman113 3 місяці тому

    👍

  • @samkumar8113
    @samkumar8113 Місяць тому

    if pass arg as n+1 does it cause overflow?