Learn C Programming

Lesson 5 of 9 · Strings

Module 10 · Strings

String Problems: Palindromes, Words, Case

Free with an accountReading

Amara runs the word-games club, and this week's theme is palindromes: words that read the same backwards. Her checker says yes to rotator and noon, and no to kayaks. Then Zara types A man, a plan, a canal: Panama, and the checker says no. A famous palindrome has just failed a palindrome test, and this lesson finds out why.

Sign in to read

This lesson is free, with an account

An account costs nothing and opens every lesson in this track that is not marked Pro, on every device you read on.

What is inside String Problems: Palindromes, Words, Case

  1. Two indexes closing in on the middle
  2. Why the famous sentence fails
  3. Normalise first, then test
  4. Counting words with a flag
  5. Changing case, one box at a time
  6. Run-length encoding, planned as a trace
  7. Reversing the words, planned as a trace
  8. Zara's edge list