You are viewing a single comment's thread. Return to all comments →
Very poor description of a simple problem..I am not sure what are we achieving by complicating the problem description.. what was the significance of length 'a' and 'b'when in example it already calls out it should be equal length in order to be anagram. This is merely making it verbose and adding complexities like |a-b| < 1 .. not contributing to the gut of the problem. My suggestion is to remove this problem or modify signifincantly. only reason I can see to keep it as is if we intent to confuse reader.
Agreed. It took me longer to understand the question than it did to write a solution.
Agreed - and this question is not unique in this. Many questions on this site are harder to understand than they are to solve.
I was about to say the same thing. Surprising that after two years, nobody corrected the problem.
|S1.len-S2.len| must be 0 or S1,S2 can't be an anagram.
same again after two years.
This is how real-world problems look like. You have to analyze it
I agree to delete this problem.
I agree on this also leaving a wrong test case, blocks one's logic. In real life of course this could happen. Or during job interview questions. But for just training skills it's not the best question.