You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Valid Anagrams problem. the solution is not complete.
it is checking that frequencyCount1 is matching with frequencyCount2 but we also need to test frequencyCount2 is matching with frequencyCount1. for example: if I run the test with const result = validAnagrams('app', 'ppax'); it returns true but it should be false.
The text was updated successfully, but these errors were encountered:
The issue in this case, with the provided solution is that the length of the freqCount1 is less than freqCount2 or str1 less than str2 where the iteration in this test case ( expect(validAnagrams('aaa', 'aaab')).toBe(false); ) would stop at aaa making it true, the same is happening with your issue. app is the same as ppa since it never gets to x. Does that make sense?
In Valid Anagrams problem. the solution is not complete.
it is checking that
frequencyCount1
is matching withfrequencyCount2
but we also need to testfrequencyCount2
is matching withfrequencyCount1
. for example: if I run the test withconst result = validAnagrams('app', 'ppax');
it returns true but it should be false.The text was updated successfully, but these errors were encountered: