Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (anonymous):

what is the difference between iteration and recursion method in algorithms?

OpenStudy (anonymous):

Iteriation loops over data with similar names like 3 variable var0 var1 var2 loop it use the loops counter to iterate over each variable for(var i=0; i<2; i++){trace(var+i);}

OpenStudy (anonymous):

ok

OpenStudy (anonymous):

recursion tells a function to repeat its self continously //intialize func0 (); function func0( param0=null):void{ param0(); //calls its self over and over again after being intialzed in the constructor part of a class}

OpenStudy (anonymous):

sudo code modify for you language

OpenStudy (anonymous):

thats mostly Flash AS3.0

OpenStudy (anonymous):

in the dictionary it says that both are about repeating procedure so what's the difference? sorry I didn't get your last two msgs

OpenStudy (anonymous):

iteriation has an end

OpenStudy (anonymous):

recursion has no end untill you return the function or maybe a break statement

OpenStudy (anonymous):

you could end the program to end recursion too...iteriation is going to stop when it increments 3 tims

OpenStudy (anonymous):

if you looped over an array you could make the counter say for(var i=0; i<arr0.length-1; i++){trace(arr0[i])}

OpenStudy (anonymous):

you could get rid of the minus 1 too ....just play around with this its pretty important when writing programs....you can also use timers to repeat functions on a timed interval...kinda useful if you need to wait for another class to process data before calling a function but event listeners are even more useful for that

OpenStudy (anonymous):

thanks @calmchessplayer

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!