Results 1 to 2 of 2

Thread: hash table

  1. #1
    pinkfahtema is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Smile hash table

    An insecure method of encrypting text is to replace a known word with another specific word. To ensure that the encryption is reversible, no two words are replaced by the same word.

    Your task is to decrypt several encoded lines of text, given the set of replacements.

    Input
    The input consists of a line containing an integer n followed by n lines, each with a lowercase word and its corresponding encrypted form. The n words compose the dictionary of words which may appear in the decrypted text and are listed in alphabetical order.
    Following the dictionary are several lines of input. Each line is encrypted as described above.
    There are no more than 1,000 words in the dictionary. No word exceeds 16 letters.
    The encrypted lines contain only lower case letters.

    Output
    Decrypt each line and print it to standard output. If there is no solution, replace every letter of the word by an asterisk.

    Sample Input
    3
    and smf
    dick fovl
    jane ksme
    fovl smf ksme smf fovl
    ghj smf fovl Sample Output
    dick and jane and dick
    *** and dick

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Did you just copy your assignment problem description and paste it here with no explanation of what you have tried so far?

Similar Threads

  1. Hash Table Synchronization....
    By bonjovi4u in forum Threads and Synchronization
    Replies: 4
    Last Post: 04-21-2010, 10:39 AM
  2. Hash Table Help
    By michael_mke in forum New To Java
    Replies: 3
    Last Post: 11-27-2008, 06:12 PM
  3. Hash table with linear probing
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-12-2008, 09:43 PM
  4. Hash table with separate chaining
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-12-2008, 09:42 PM
  5. Hash Table help
    By rhm54 in forum New To Java
    Replies: 0
    Last Post: 02-08-2008, 02:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •