Lesson 9 - Data Structures
Objectives
-
Working with Lists
-
Write a method to remove all odd numbers from the list of integers.
-
Side Quest: Take a peek at delegates and lambdas through List.RemoveAll(). Check out the source code of the method.
-
-
Jagged vs Multidimentional arrays.
- Write a method to return the sum of all the elements in a given matrix.
-
Learn about Dictionaries and HashSets
-
Write a method to calculate the frequencies of the items in a given array. I.e. for
[1, 3, 1, 5, 5, 7]
it should return[{1, 2}, {3, 1}, {5, 2}, {7, 1}]
-
** Side Quest: To learn about the internal workings of dictionaries check out this Wikipedia article: https://en.wikipedia.org/wiki/Hash_table
-
Home Assignments
-
Watch a talk on recursion: https://www.youtube.com/watch?v=AfBqVVKg4GE