Tech IndustryNov 6, 2019
Fox NewsLayedOff

Isomorphic Strings - LC(205) How to deal with bad interviewers?

TLDR; go ahead destroy me!! experience - 15+ java, includes 8+ android obligatory tc - just as my handle says, so there's that. returned from an fte interview today, was posed this problem to solve on white-board. i had previously solved this, at least 4 months ago ever since i began LCing hard. isIsomorphic("egg", "add") -> true isIsomorphic("foo", "bar") -> false before beginning to write the code, i started off with the discussion to set the ground rules, seeking multiple clarifications. is isomorphism uni-directional or bi-directional? of course bi-directional. however, there's two kinds of bi-directional. 1) 'e' can be replaced with 'a' from left-to-right, so 'e' can be replaced only with 'a' from right-to-left as well. 2) left-to-right and right-to-left, each independent uni-directional replacement at the same index need not match, although since we are checking both directions, it's still bi-directional. isIsomorphic("ab", "ca") -> true every time 'a' appears in the left input, there must be a 'c' in the right input. but every time 'a' appears in the right input, it does not have to be 'c' in the left input. LC establishes the second-rule. clarification with the interviewer, i was suggested the first-rule, although I did not verbally ask about the "ab", "ca" comparison. i write pseudo-statements for as many clarifications and ground-rules toward a corner of the white-board. based off the clarification i was given, i solved it wrong in LC standards. i won't get the job!!

Add a comment
Bloomberg offByOme Nov 6, 2019

Ok?

Google CAN’Touch Nov 6, 2019

So what was your solution?

Fox News LayedOff OP Nov 6, 2019

absolute one-on-one char-mapping, irrespective of what character appears at an index in which input, left or right, the associated mapped character should be spotted at the same index in the other input. which is not how "ab", "ca" works. not coming up with "ab", "ca" sample input was my poor programming skills?

Google CAN’Touch Nov 7, 2019

I still don’t get how “ab” “ca” is an edge case. All you need is mapping char to char.

Amazon sekuro Nov 7, 2019

Maybe you have bad communication skills (or are just frustrated and communicating over text is difficult) because I understand the problem pretty well but don’t understand your interpretation or how “ab”,”ca” is an edge case. A maps to c, b maps to a. The better edge case is something like abc, dff.

New
ronney Nov 7, 2019

Which company?