IBM | OA | String Analogy
Anonymous User
1053

Question: String Analogy
Analogy: A comparision between one thing and another, typically for the purpose of explanation or clarification.
eg: Hammer : Nail :: Comb : Hair

Given a string a, it's equivalent analogy is string b.

Examples:
a = "AFHO" & b = "OMCO",
a = "ADOPT" & b = "TSVMT",
a = "LEVEL" & b = "LEVEL",
a = "AUTO" & b = "OOZO"

Given the function stringAnalogy(string a), return the string b.

Constraint:
Each character in a is a character in range ascii[A-Z].

This is all it was given in the question.

Anyone with an approach, do comment.

Comments (2)