UVa 10260

From Algorithmist
Jump to navigation Jump to search

10260 - Soundex[edit]

Summary[edit]

Given a word determine its sound represented in digits

Explanation[edit]

  • Generate a mapping to numbers and figure out what each sound will produce.
  • If the previous letter was the same dont output anything.

Implementations[edit]

Input[edit]

KHAWN
PFISTER
BOBBY

Output[edit]

25
1236
11