UVa 10260

From Algorithmist

Jump to: navigation, search

Contents

[edit] 10260 - Soundex

[edit] Summary

Given a word determine its sound represented in digits

[edit] Explanation

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

[edit] Input

KHAWN
PFISTER
BOBBY

[edit] Output

25
1236
11
Personal tools