Skip to main content

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.95
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 44.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Interestingly, you will observe that Python does not support the post-testing with a syntax, at all.

  2. 2.

    Minor variations among languages can occur about the location to which the actual jump is made.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics