Skip to content

Instantly share code, notes, and snippets.

@ElemarJR
Created February 9, 2023 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElemarJR/0c863da8eff6441d9d924f0695b302c8 to your computer and use it in GitHub Desktop.
Save ElemarJR/0c863da8eff6441d9d924f0695b302c8 to your computer and use it in GitHub Desktop.
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