using System; using System.Collections.Generic; using System.Linq; public class Solution { public int solution(int k, int[] tangerine) { int answer = 0; int maxNum = 0; int K = k; int count = 0; Dictionary dic = new Dictionary(); for (int i = 0; i < tangerine.Length; ++i) { if (!dic.ContainsKey(tangerine[i])) dic.Add(tangerine[i], 1); else dic[tangerine[i]]++; } var list = dic.OrderByDescending(..