leetcode
leetcode copied to clipboard
Is this a bug with “Longest Substring Without Repeating Characters”?
https://github.com/haoel/leetcode/blob/725a380d5c2644dfadb5498dd3ec8596b5e59618/algorithms/cpp/longestSubstringWithoutRepeatingCharacters/longestSubstringWithoutRepeatingCharacters.cpp#L47
I’d thought that memset initialize bytes but not integers?
Setting all the bytes of a integer to -1 (0xFF) results in the integer becoming 0xFFFFFFFF (-1).