Created
February 9, 2023 11:12
-
-
Save ElemarJR/0c863da8eff6441d9d924f0695b302c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class FrequencyTable | |
{ | |
public static Dictionary<char, int> Create(string input) | |
{ | |
foreach (char character in input) | |
{ | |
if (frequencyTable.ContainsKey(character)) | |
{ | |
frequencyTable[character]++; | |
} | |
else | |
{ | |
frequencyTable[character] = 1; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment