HashMap1 [LeetCode] 1941. Check if All Characters Have Equal Number of Occurrences, C Solution - Use Hash Map - Compare Counting Number of each Character (except 0 occurence character) #define NumOfLowerCaseEnglishLetter 26 #define ASCII_INIT_NUM_IDX 97 bool areOccurrencesEqual(char* s) { long int NumOfChar = 0; int RefNum = 0; int arr[NumOfLowerCaseEnglishLetter] = { 0 }; // consists of lowercase English letters bool RetVal = true; while (s[NumOfChar] != '\0') { ++arr[s[NumOfCha.. 2022. 12. 31. 이전 1 다음