Developer Advisor Interview Questions

710,959 developer advisor 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' */

If you had twelve identical looking-balls except that one weighed more or less than the other 11, and could weigh the balls (or any subset) three times, how can you find the correct ball and whether it weighed more or less?
avatar

Software Developer

Interviewed at JPMorganChase

3.9
Sep 27, 2011

If you had twelve identical looking-balls except that one weighed more or less than the other 11, and could weigh the balls (or any subset) three times, how can you find the correct ball and whether it weighed more or less?

Viewing 1191 - 1200 interview questions

Glassdoor has 710,959 interview questions and reports from Developer advisor interviews. Prepare for your interview. Get hired. Love your job.