Skip to content
Marlbridge

AP® Computer Science A · Unit 2 · Topic 2.10

Implementing String Algorithms: Topic Checklist (Computer Science A 2.10)

Specific I can statements for standard algorithms that process strings with loops, each linked to the guide section or practice question that tests it.

Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.

Understanding

  • I can state the valid indexes of a String and what substring(a, b) returns. (Guide: “Strings as sequences you can loop over”; Practice question 1)
  • I can explain why s.substring(1); on its own does not change s. (Guide: “Strings are immutable”; Practice question 5)
  • I can explain what causes a StringIndexOutOfBoundsException. (Guide: “Out of range”; Practice questions 4 and 6)
  • I can explain why strings are compared with equals rather than ==. (Guide: “The three standard string algorithms”; Practice question 8)

Skills

  • I can loop through a String one character at a time. (Guide: “Visiting every character”; Practice question 2)
  • I can count characters that meet a criterion, including membership in a set with indexOf. (Guide: Worked example 1; Practice question 7)
  • I can count substrings with a window of fixed length. (Guide: Worked example 2; Practice questions 9 and 10)
  • I can build a new String, in order or reversed. (Guide: “The three standard string algorithms”; Practice questions 3 and 8)

Reasoning

  • I can find the correct upper bound for a window loop. (Guide: Worked example 2; Practice questions 6 and 10)
  • I can trace a string loop in a table and report the output. (Guide: Worked examples 1 and 2; Practice question 9)
  • I can write a correct palindrome test and explain why it works. (Guide: “The three standard string algorithms”; Practice question 8)

All ticked? Move on to the Topic 2.11 study guide, Nested Iteration.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.