create account

Programming Concepts - Recursive Function - Real Life Example (road-to-home 🏘️) by bravedevelopment

View this thread on: hive.blogpeakd.comecency.com
· @bravedevelopment ·
$0.52
Programming Concepts - Recursive Function - Real Life Example (road-to-home 🏘️)
What is a recursive function, what does Recursion mean in Programming?
 πŸ”Ή **Recursive functions** are functions that call themselves continuously, not in infinity, but until reaching some specified condition.
 πŸ”Ή**Recursion** is tactic, a concept in development that includes a function or method that calls itself in a recursive way.

> ***Recursive functions can be interpreted sometimes as routines that call themselves in two ways: direct way or indirect way***

### **What is recursion explained by example?**
- It is a powerful programming technique which used to solve one or more practical problems and especially situations by choosing a simple way to break the problem into smaller pieces.
One Great example would be

```
"road-to-home" operation
The recursion solution for this operation would be:

-- Origin: You have your starting point
-- Destination: You are at home, you just arrived

The process of going from your origin to your destination Home, it includes the process of recursion. So it would break it this scenario only:

-- 000111 If you are at Home stop walking, recursion over your reached Home
-- 111000 Otherwise, walk a step closer to the home
```
The road from origin to home is divided in small pieces: steps, and the road is a recursion itself, you walk step by step (repetitive ) until a condition is met. In our scenario, reach to Home.


![anthonyreungeres6xt1mwF_iUunsplash.jpg](https://files.steempeak.com/file/steempeak/bravedevelopment/w5dDeGhl-anthony-reungere-s6xt1mwF_iU-unsplash.jpg)

**Photo by Anthony Reungère on Unsplash**

> Generally a recursive function, method, algorithm has the logic as following:
=> if a condition deriving from a method you have set solves the problem, then stop the recursion, otherwise simplify the problem more recursively by dividing it in small pieces till to the resolving point.


---
**It's amazing how real-life examples can be used to explain algorithmic and programming concepts. Love what's you do. Kudos Stemians**
πŸ‘  , , , , , , , , , , , , , , , , ,
properties (23)
authorbravedevelopment
permlinkprogramming-concepts-recursive-function-real-life-example-road-to-home
categoryadventure
json_metadata{"image":["https://files.steempeak.com/file/steempeak/bravedevelopment/w5dDeGhl-anthony-reungere-s6xt1mwF_iU-unsplash.jpg"],"tags":["adventure","community","software","programming","lifestyle","technology","esteem","esteemapp"],"app":"esteem/2.2.4-mobile","format":"markdown+html","community":"hive-125125"}
created2020-03-13 16:45:36
last_update2020-03-13 16:45:36
depth0
children2
last_payout2020-03-20 16:45:36
cashout_time1969-12-31 23:59:59
total_payout_value0.254 HBD
curator_payout_value0.261 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,998
author_reputation1,763,270,555,566
root_title"Programming Concepts - Recursive Function - Real Life Example (road-to-home 🏘️)"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,327,541
net_rshares2,839,497,041,099
author_curate_reward""
vote details (18)
@florianopolis ·
***But the end of all things has drawn near.*** Therefore be sober-minded and be sober unto prayers.(1 Peter 4:7)
## Question from the Bible, *Who can lead me to heaven?*
Watch the Video below to know the Answer...
***(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)***
https://youtu.be/cK1rrOpwqZM
Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to **Thank you, our beloved friend.**  
Check our [Discord Chat](https://discord.gg/vzHFNd6) 
Join our Official Community: https://steemit.com/created/hive-182074
πŸ‘  
πŸ‘Ž  
properties (23)
authorflorianopolis
permlinki1lhojqwnqf
categoryadventure
json_metadata""
created2020-03-13 16:53:51
last_update2020-03-13 16:53:51
depth1
children0
last_payout2020-03-20 16:53:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length680
author_reputation-5,988,767,749,052
root_title"Programming Concepts - Recursive Function - Real Life Example (road-to-home 🏘️)"
beneficiaries[]
max_accepted_payout10,000.000 HBD
percent_hbd100
post_id96,327,715
net_rshares-25,139,431,038
author_curate_reward""
vote details (2)
@irfan422 ·
Excellent work
properties (22)
authorirfan422
permlinkre-bravedevelopment-2020317t172646218z
categoryadventure
json_metadata{"tags":["adventure","community","software","programming","lifestyle","technology","esteem","esteemapp"],"app":"esteem/2.2.4-mobile","format":"markdown+html","community":"hive-125125"}
created2020-03-17 12:26:48
last_update2020-03-17 12:26:48
depth1
children0
last_payout2020-03-24 12:26:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length14
author_reputation1,600,490,610
root_title"Programming Concepts - Recursive Function - Real Life Example (road-to-home 🏘️)"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,433,947
net_rshares0