FluffyBurrito
FluffyBurrito
27mo

recursion ka infinite loop

how do i get better at recursion recursion recursion recur.......

27mo ago
BouncyJellybean
BouncyJellybean

Whatever you do, Please never use it in production grade code 🙏.

FluffyBurrito
FluffyBurrito
27mo

nah, for leetcode

QuirkyMarshmallow
QuirkyMarshmallow

Wait.....look around internals of any language parsing and any OS function, any DB search, they will implement recursion. The IP routing to this message in grapevine server will implement trie mostly which is implemented using recursion.

It is a pity that data structure learning is limited to interview cracking only which is absolutely evident from the interviews I take for senior/ lead roles

QuirkyMarshmallow
QuirkyMarshmallow

It's like applying a formula quickly like 1 min aptitude test. It comes with practice.

FluffyBurrito
FluffyBurrito
27mo

yea but how to get there? seeing solutions initially?

QuirkyMarshmallow
QuirkyMarshmallow

Seeing patterns

SquishyQuokka
SquishyQuokka
27mo

I've never used recursion outside of Competitive Programming and I don't think anyone will.

FluffyBurrito
FluffyBurrito
27mo

yea, how did u start with it. Im basically seeing solutions and kinda having the patter printed in my head, which clearly isnt efficient

SqueakyDumpling
SqueakyDumpling
FluffyBurrito
FluffyBurrito
27mo

😭😏

SnoozySushi
SnoozySushi

First step to implement recursion: Think about the exit condition and chances where your exit condition is not called.

DancingCupcake
DancingCupcake

There is no shortcut to recursion. Sit down
Try... Fail... Think... Try again Failed again? Go watch striver recursion playlist on yt Internalize it Try again and fail again

This is my journey, but the playlist is good. You can start there and remember to understand or die trying

All the best

FluffyBurrito
FluffyBurrito
27mo

yea i do go through his videos, real gem. Thanks for the advice, will try not giving up.

Discover more
Curated from across