Abstract
This chapter pertains to how a programmer can deal with problems that involve actions on ‘bulky’ data. For such problems, a programmer has two choices: “recursion” or “iteration”. The chapter presents a meta-algorithm, a novel set of rules for the construction of a recursive solution to a world problem, and illustrates it with clear examples. As for iteration, the chapter covers all the basic types of iterative constructs (e.g., Premod-Posttest, etc.) that are widely used in the world of programming. Tips for the construction of an efficient iterative solution are also given. Finally, the advantages and disadvantages of recursion and iteration are discussed in depth. While covering recursion and iteration, examples and case studies are provided in Python.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Interestingly, you will observe that Python does not support the post-testing with a syntax, at all.
- 2.
Minor variations among languages can occur about the location to which the actual jump is made.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Wien
About this chapter
Cite this chapter
Üçoluk, G., Kalkan, S. (2012). Managing the Size of a Problem. In: Introduction to Programming Concepts with Case Studies in Python. Springer, Vienna. https://doi.org/10.1007/978-3-7091-1343-1_4
Download citation
DOI: https://doi.org/10.1007/978-3-7091-1343-1_4
Publisher Name: Springer, Vienna
Print ISBN: 978-3-7091-1342-4
Online ISBN: 978-3-7091-1343-1
eBook Packages: Computer ScienceComputer Science (R0)