Iterative approach in TopBiologist(SRM 682 Div 2 medium)

Revision en1, by div24ever, 2016-02-25 17:20:25

I solved TopBiologist by recursion. I want to know if there is any iterative approach? We will need to run loop 6 times to generate sequence of length 6. Is there any shorter way to do this?

My code

Tags topcoder, srm

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English div24ever 2016-02-25 17:20:25 354 Initial revision (published)