Statistics

Problem Statement for "LetterSet"

Problem Statement

Write a method which, given a String[] over the alphabet 'A'-'Z', figures out the set of letters that are not present in the String's and orders them alphabetically.

Definition

Class:
LetterSet
Method:
compliment
Parameters:
String[]
Returns:
String
Method signature:
String compliment(String[] str)
(be sure your method is public)

Constraints

  • str contains between 0 to 50 elements, inclusive.
  • Each element of str contains between 1 and 50 characters, inclusive.
  • Each element of str contains only the capital letters 'A'-'Z'.

Examples

  1. {}

    Returns: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

  2. {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"}

    Returns: ""

  3. {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}

    Returns: ""

  4. {"NATURAL", "SPRING", "NATRUAL", "WATER"}

    Returns: "BCDFHJKMOQVXYZ"

  5. {"E", "EE", "EEEE", "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"}

    Returns: "ABCDFGHIJKLMNOPQRSTUVWXYZ"

  6. {"LIKE", "GETCHAR", "AND", "PUTCHAR", "GETC", "AND", "PUTC", "ARE", "MACROS", "DEFINED", "IN", "STDIOH"}

    Returns: "BJQVWXYZ"

  7. {"PURITY", "GUARANTEED", "NON", "CARBONATED", "PURIFIED", "DRINKING", "WATER"}

    Returns: "HJLMQSVXZ"

  8. {"TOURNEE", "DU", "CHAT", "NOIR", "DE", "RODOLPTTE", "SALIS"}

    Returns: "BFGJKMQVWXYZ"

  9. {"PAPIER", "A", "CIGARETTES", "JOB", "HORS", "CONCOURS", "PARIS"}

    Returns: "DFKLMQVWXYZ"

  10. {"LEARN", "UNIX", "IN", "TEN", "MINUTES"}

    Returns: "BCDFGHJKOPQVWYZ"

  11. {"ENJOY", "THE", "CRISP", "REFRESHING", "TASTE", "OF", "WATER"}

    Returns: "BDKLMQUVXZ"

  12. {"THE", "QUICK", "BROWN", "FOX", "JUMPED", "OVER", "THE", "LAZY", "DOG", "THE", "LAZY", "DOG", "DIED"}

    Returns: "S"

  13. {"STYLE", "UNLIKE", "ANY", "OTHER"}

    Returns: "BCDFGJMPQVWXZ"

  14. {"S"}

    Returns: "ABCDEFGHIJKLMNOPQRTUVWXYZ"

  15. {"S", "A", "T", "U", "R", "N", "J", "U", "P", "I", "T", "E", "R", "A", "N", "D", "C", "O", "M", "P", "A", "N", "Y", "A", "T", "S", "A", "T", "U", "R", "N", "J", "U", "P", "I", "T", "E", "R", "A", "N", "D", "C", "O", "M", "P", "A", "N", "Y", "A", "T"}

    Returns: "BFGHKLQVWXZ"

  16. {"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}

    Returns: "BCDEFGHIJKLMNOPQRSTUVWXYZ"

  17. {"BCDEFGHIKLMNOPQRSTUWXYZ"}

    Returns: "AJV"

  18. {}

    Returns: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

  19. {"X", "XYZ"}

    Returns: "ABCDEFGHIJKLMNOPQRSTUVW"

  20. {"ABX", "ABXY", "A"}

    Returns: "CDEFGHIJKLMNOPQRSTUVWZ"

  21. {"CD"}

    Returns: "ABEFGHIJKLMNOPQRSTUVWXYZ"

  22. {"BLAA", "GLAASS", "WELL", "ZXCD", "WWLP", "WMNE", "PTRYEM", "BGHT"}

    Returns: "FIJKOQUV"

  23. {"A"}

    Returns: "BCDEFGHIJKLMNOPQRSTUVWXYZ"

  24. {"ACE", "LACE"}

    Returns: "BDFGHIJKMNOPQRSTUVWXYZ"

  25. {"X", "XYZ"}

    Returns: "ABCDEFGHIJKLMNOPQRSTUVW"


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: