We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
public static int pickingNumbers(List a)
{
Dictionary frequency = new Dictionary();
int longestNumber = 0;
foreach(int number in a)
{
if (frequency.ContainsKey(number))
frequency[number]++;
else
frequency[number] = 1;
}
Picking Numbers
You are viewing a single comment's thread. Return to all comments →
public static int pickingNumbers(List a) { Dictionary frequency = new Dictionary(); int longestNumber = 0; foreach(int number in a) { if (frequency.ContainsKey(number)) frequency[number]++; else frequency[number] = 1; }