Engineer Software Interview Questions

511,875 engineer software interview questions shared by candidates

Given two words as Strings, determine if they are isomorphic. Two words are called isomorphic if the letters in one word can be remapped to get the second word. Remapping a letter means replacing all occurrences of it with another letter while the ordering of the letters remains unchanged. No two letters may map to the same letter, but a letter may map to itself. * * Example: * given "foo", "app"; returns true * we can map 'f' -> 'a' and 'o' -> 'p' * * given "foo", "boa"; returns false * we can map 'f' -> 'b', 'o' -> 'o', we can't map 'o' -> 'a' * * given "bar", "foo"; returns false * we can't map both 'a' and 'r' to 'o' * * given "turtle", "tletur"; returns true * we can map 't' -> 't', 'u' -> 'l', 'r' -> 'e', 'l' -> 'u', 'e' ->'r' * * given "ab", "ca"; returns true * we can map 'a' -> 'c', 'b' -> 'a' */
avatar

Software Engineer

Interviewed at LinkedIn

3.8
May 29, 2015

Given two words as Strings, determine if they are isomorphic. Two words are called isomorphic if the letters in one word can be remapped to get the second word. Remapping a letter means replacing all occurrences of it with another letter while the ordering of the letters remains unchanged. No two letters may map to the same letter, but a letter may map to itself. * * Example: * given "foo", "app"; returns true * we can map 'f' -> 'a' and 'o' -> 'p' * * given "foo", "boa"; returns false * we can map 'f' -> 'b', 'o' -> 'o', we can't map 'o' -> 'a' * * given "bar", "foo"; returns false * we can't map both 'a' and 'r' to 'o' * * given "turtle", "tletur"; returns true * we can map 't' -> 't', 'u' -> 'l', 'r' -> 'e', 'l' -> 'u', 'e' ->'r' * * given "ab", "ca"; returns true * we can map 'a' -> 'c', 'b' -> 'a' */

Viewing 1041 - 1050 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 511,875 interview questions and reports from Engineer software interviews. Prepare for your interview. Get hired. Love your job.