Bug Report for is-anagram
Closed this issue · 1 comments
mfgruschow commented
Bug Report for https://neetcode.io/problems/is-anagram
I am getting some kind of compilation error via the web compiler that I am not able to recreate locally. The first screenshot is from neetcode, the second is from my local area. The code is exactly the same (except i changed the variable of str to simply s to make sure there wasnt some name shadowing going on) yet the local receives no error and produces the correct solution.
mfgruschow commented
Solution: no leading const for variable declaration within for loop. The local compiler didn't report any issue but the web compiler didnt like it.