Differences between revisions 33 and 34
Revision 33 as of 2019-07-15 09:10:47
Size: 950
Comment:
Revision 34 as of 2019-07-15 09:13:52
Size: 961
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
An ''ordered word ladder'' ('owl') is an alphabetically-ordered sequence of words where each word in the sequence differs from its predecessor by: An ''ordered word ladder'' ('owl') is an alphabetically-ordered sequence of words where each word in the sequence differs from its predecessor by one action:

Assignment 2: Ordered Word Ladders

An ordered word ladder ('owl') is an alphabetically-ordered sequence of words where each word in the sequence differs from its predecessor by one action:

  1. changing one letter, e.g. barn→born

  2. adding or removing one letter, e.g. band→brand and bran→ran

The following are examples of word ladders of different length:

  • ban→bar→boar→boat→goat, length 5

  • an→can→cane→dane→date→mate→mite→site→size, length 9

At the heart of the assignment is a function that compares 2 arbitrary strings and returns true if the strings satisfy one of the 2 conditions above, and false otherwise. This function has signature:

   1 bool differByOne(char *, char *)

Write such a function and of course test it.

Details of the assignment will follow shortly.

Assignment2 (last edited 2019-07-31 22:35:13 by AlbertNymeyer)