Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
Reversing a string means changing the order of its characters so that the last character becomes the first, the second-to-last character becomes the second, and so on.
A substring is a smaller part of a larger string. For example, in the string "hello", "ell" is a substring.
Palindrome: A palindrome is a word or phrase that reads the same forwards and backwards. For example, "racecar" is a palindrome.
Concatenation: Concatenation refers to combining two or more strings together to create one longer string. For example, concatenating "hello" and "world" would result in "helloworld".