Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":13903,"date":"2015-05-06T12:25:35","date_gmt":"2015-05-06T17:25:35","guid":{"rendered":"https:\/\/mauriciocoopera.withknown.com\/2015\/mastery-21"},"modified":"2015-05-06T12:25:35","modified_gmt":"2015-05-06T17:25:35","slug":"mastery-21-7","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/mastery-21-7\/","title":{"rendered":"Mastery 21"},"content":{"rendered":"
\n

Use of recursion for repetitives algorithms<\/p>\n

What is recursion? The simple answer is, it\u2019s when a function calls itself. But how does this happen? Why would this happen, and what are its uses?<\/span>

When we talk about recursion, we are really talking about creating a loop. Let\u2019s start by looking at a basic loop.<\/span>

<\/p>\n

\n\n\n\n
#a0a0a0; text-align: right; vertical-align: top; min-width: 20px;”><\/p>\n
1
2
3
<\/code><\/pre>\n<\/td>\n
#c0c0d0; vertical-align: top; background: #efefff;”><\/p>\n
for<\/var>(int<\/var> i=0;  i\"The number is: \" <\/code><\/pre>\n<\/td>\n
\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n



For those who don\u2019t yet know, this basic loop displays the sentence, “The number is: ” followed by the value of \u2018i\u2019. Like this.<\/span><\/p>\n

\n\n\n\n
#e7e7e7;”><\/p>\n
\nThe number is: 0\nThe number is: 1\nThe number is: 2\nThe number is: 3\nThe number is: 4\nThe number is: 5\nThe number is: 6\nThe number is: 7\nThe number is: 8\nThe number is: 9\n<\/samp><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n


Inside the \u2018for loop\u2019 declaration we have the integer variable \u2018i\u2019 and have its starting value of 0. So the first time the sentence is displayed it reads, “The number is: 0”. The part of the \u2018for loop\u2019 declaration that is \u2018i++\u2019 tells the program that each time the loop repeats, the value of \u2018i\u2019 should be increased by 1. So, the next time the sentence is displayed it reads, “The number is: 1”.<\/span>
This cycle will continue to repeat for as long as the value of \u2018i\u2019 is less than 10. The last sentence displayed would read, “The number is: 9”. As you can see the basic \u2018for loop\u2019 has three parts to its declaration, a starting value, what must remain true in order to continue repeating, and a modifying expression. Everything that is contained within the {braces} is what the program performs. Cout stands for console out, and prints words or characters to the screen.<\/span>
So what does this have to do with recursion? Remember recursion is a loop. What if I did not want to just print a message to the screen? A loop can be used to perform other tasks as well.<\/span><\/p>\n

Credit:<\/span><\/p>\n

<\/a>http:\/<\/wbr>\/<\/wbr>www.cplusplus.com\/<\/wbr>articles\/<\/wbr>D2N36Up4\/<\/wbr><\/a><\/span><\/p>\n

#TC<\/a>1017 #Mastery<\/a>21<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

\n

Use of recursion for repetitives algorithms<\/p>\n

What is recursion? The simple answer is, it’s when a function calls itself. But how does this happen? Why would this happen, and what are its uses?<\/span><\/p>\n

When we talk about recursion, we are really talking about creating a loop. Let’s start by looking at a basic loop.<\/span><\/p>\n

\n\n\n\n
#a0a0a0; text-align: right; vertical-align: top; min-width: 20px;”><\/p>\n
1
2
3
<\/code><\/pre>\n<\/td>\n
#c0c0d0; vertical-align: top; background: #efefff;”><\/p>\n
for<\/var>(int<\/var> i=0;  i\"The number is: \" <\/code><\/pre>\n<\/td>\n
 <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n

For those who don’t yet know, this basic loop displays the sentence, “The number is: ” followed by the value of ‘i’. Like this.<\/span><\/p>\n

\n\n\n\n
#e7e7e7;”><\/p>\n
\nThe number is: 0\nThe number is: 1\nThe number is: 2\nThe number is: 3\nThe number is: 4\nThe number is: 5\nThe number is: 6\nThe number is: 7\nThe number is: 8\nThe number is: 9\n<\/samp><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n

Inside the ‘for loop’ declaration we have the integer variable ‘i’ and have its starting value of 0. So the first time the sentence is displayed it reads, “The number is: 0”. The part of the ‘for loop’ declaration that is ‘i++’ tells the program that each time the loop repeats, the value of ‘i’ should be increased by 1. So, the next time the sentence is displayed it reads, “The number is: 1”.<\/span>
This cycle will continue to repeat for as long as the value of ‘i’ is less than 10. The last sentence displayed would read, “The number is: 9”. As you can see the basic ‘for loop’ has three parts to its declaration, a starting value, what must remain true in order to continue repeating, and a modifying expression. Everything that is contained within the {braces} is what the program performs. Cout stands for console out, and prints words or characters to the screen.<\/span>
So what does this have to do with recursion? Remember recursion is a loop. What if I did not want to just print a message to the screen? A loop can be used to perform other tasks as well.<\/span><\/p>\n

Credit:<\/span><\/p>\n

<\/a>http:\/\/www.cplusplus.com\/articles\/D2N36Up4\/<\/a><\/span><\/p>\n

#TC<\/a>1017 #Mastery<\/a>21<\/p>\n<\/div>\n

Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,26],"tags":[330,328,325,326,399,327,335,486,40,287],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/13903"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=13903"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/13903\/revisions"}],"predecessor-version":[{"id":13904,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/13903\/revisions\/13904"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=13903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=13903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=13903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}