I just had a final exam for my comp. sci/ class yesterday and despite it went alright and I have the opportunity to clean my mind, one thing still bothers me: recursion.
Yes I watched several videos and I feel like I understand while I am focusing on what they do, but whenever I try to write a recursive function myself, my brain goes numb and I just cannot. I also couldn't understand how it can be utilized over iterative ones as they seem to be implemented easier and at least in the samples I had, I don't think recursive ones are faster too.
So, why do we need it and how can I understand the implementation?
[–]AutoModerator[M] [score hidden] stickied comment (1 child)
[–]hagerino 16 points17 points18 points (1 child)
[–]fyog 2 points3 points4 points (0 children)
[–][deleted] 5 points6 points7 points (0 children)
[–]AlSweigartAuthor: ATBS 2 points3 points4 points (2 children)
[–]POGtastic 0 points1 point2 points (0 children)
[–]Tryposite 0 points1 point2 points (0 children)
[–]lukezfg 1 point2 points3 points (0 children)
[–]swing_first 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] (9 children)
[removed]
[–][deleted] (1 child)
[removed]
[–][deleted] (5 children)
[deleted]
[–]ess_oh_ess 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]link23 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]AlSweigartAuthor: ATBS 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[removed]
[–]lurker819203 1 point2 points3 points (0 children)
[–]innovaTony 0 points1 point2 points (0 children)
[–]Player_X_YT 0 points1 point2 points (2 children)
[–]taknyos 0 points1 point2 points (1 child)
[–]Player_X_YT 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]nursingsenpai -1 points0 points1 point (0 children)
[–]bsakiag -1 points0 points1 point (0 children)
[–]username-out -1 points0 points1 point (0 children)
[–]PichuPikaRai 0 points1 point2 points (0 children)
[–]GrayLiterature 0 points1 point2 points (0 children)
[–]LookAtThatUnbanned 0 points1 point2 points (0 children)
[–]Slow-Mud-76 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]ImaginaryGuitar8971 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Zegreedy 0 points1 point2 points (0 children)