1 / 36

Chapter 10: Recursion

Chapter 10: Recursion. Problem Solving & Program Design in C Sixth Edition By Jeri R. Hanly & Elliot B. Koffman. Figure 10.1 Splitting a Problem into Smaller Problems. Figure 10.2 Recursive Function multiply. Figure 10.3 Thought Process of Recursive Algorithm Developer.

xerxes
Download Presentation

Chapter 10: Recursion

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 10:Recursion Problem Solving & Program Design in C Sixth Edition By Jeri R. Hanly & Elliot B. Koffman

  2. Figure 10.1 Splitting a Problem into Smaller Problems

  3. Figure 10.2 Recursive Function multiply

  4. Figure 10.3 Thought Process of Recursive Algorithm Developer

  5. Figure 10.4 Recursive Function to Count a Character in a String

  6. Figure 10.5 Trace of Function multiply

  7. Figure 10.6 Function reverse_input_words

  8. Figure 10.7 Trace of reverse_input_words(3) When the Words Entered are "bits" "and" "bytes"

  9. Figure 10.8 Sequence of Events for Trace of reverse_input_words(3)

  10. Figure 10.9 Recursive Function multiply with Print Statements to Create Trace and Output from multiply(8, 3)

  11. Figure 10.9 Recursive Function multiply with Print Statements to Create Trace and Output from multiply(8, 3) (cont’d)

  12. Figure 10.10 Recursive factorial Function

  13. Figure 10.11 Trace of fact = factorial(3);

  14. Figure 10.12 Iterative Function factorial

  15. Figure 10.13 Recursive Function fibonacci

  16. Figure 10.14 Program Using Recursive Function gcd

  17. Figure 10.14 Program Using Recursive Function gcd (cont’d)

  18. Figure 10.15 Recursive Function to Extract Capital Letters from a String

  19. Figure 10.16 Trace of Call to Recursive Function find_caps

  20. Figure 10.17 Sequence of Events for Trace of Call to find_caps from printf Statements

  21. Figure 10.18 Trace of Selection Sort

  22. Figure 10.19 Recursive Selection Sort

  23. Figure 10.19 Recursive Selection Sort (cont’d)

  24. Figure 10.20 Recursive Set Operations on Sets Represented as Character Strings

  25. Figure 10.20 Recursive Set Operations on Sets Represented as Character Strings (cont’d)

  26. Figure 10.20 Recursive Set Operations on Sets Represented as Character Strings (cont’d)

  27. Figure 10.20 Recursive Set Operations on Sets Represented as Character Strings (cont’d)

  28. Figure 10.20 Recursive Set Operations on Sets Represented as Character Strings (cont’d)

  29. Figure 10.20 Recursive Set Operations on Sets Represented as Character Strings (cont’d)

  30. Figure 10.21 Towers of Hanoi

  31. Figure 10.22 Towers of Hanoi After Steps 1 and 2

  32. Figure 10.23 Towers of Hanoi After Steps 1, 2, 3.1, and 3.2

  33. Figure 10.24 Recursive Function tower

  34. Figure 10.25 Trace of tower ('A', 'C', 'B', 3);

  35. Figure 10.26 Output Generated by tower('A', 'C', 'B', 3);

  36. Figure 10.27 Grid with Three Blobs

More Related