Examness

Intermediate C#

2 exercises · in teaching order

  1. 1Squares of evens, with LINQWrite `static List<int> EvenSquares(List<int> nums)` returning the squares of the even values, preserving order.WhereSelectmethod chains9m
  2. 2Word frequenciesWrite `static int MaxWordCount(string text)` returning how many times the most frequent word appears. Split on spaces, compare case-insensitively. Empty text returns 0.DictionaryTryGetValueSplit10m