[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I find recursion so confusing. I feel like a legit retard, makes

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 10
Thread images: 1

File: 1438191903982.png (46KB, 1500x1383px) Image search: [Google]
1438191903982.png
46KB, 1500x1383px
I find recursion so confusing. I feel like a legit retard, makes my sympathize with dyslexics.
>>
>>59195013
Nigger wtf
>>
>>59195013

You just need to take a step back and look at the bigger picture.
>>
>>59195013
>DAD! I cannot build this lego house! It is so confusing!
>Ok son, let us break it down to make it easier. Maybe we can build each room by itself first?
>But dad, even the rooms are a bit tough!
>Ok son, let us build the walls and floor of each room first.
>Oh... that is smart. Thanks dad!
>You are most welcome, son.
>I love you dad!
>I love you too, son.
>>
>>59195095
I can't relate to that at all. it's not helping me understand
>>
things go in, and go in again

can't explain that
>>
>>59195479
There are two parts to recursion: The theory, and the application.

Theory: Recursion is when a function calls itself.

Application: When a problem is too big for a function to handle, break it into chunks and feed the chunks to the function. If any chunk is too big, break it down into even smaller chunks, until you get chunks that the function can handle.
>>
Ask yourself "does the way a program executes change when you make a recursive call"

The answer is no, when that recursive call ends, the program continues.

P(P(P(a)))

Work from the inside out.
>>
>>59195013

Three rules to recursion:

1. The functions has to call itself
2. There must be a clear reachable moment (condition) when the recursion will end.
3. After each iteration, we should be getting closer to approaching the moment from point two.
>>
>>59195013
Just practice with simple problems for an hour or two. It's really all about getting into the groove of using the steps >>59197900
describes.
Thread posts: 10
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.