Book --> Visual C# How to Program (6th Edition) Exercise 21.8 on page 890. Pleas
ID: 3717536 • Letter: B
Question
Book --> Visual C# How to Program (6th Edition)
Exercise 21.8 on page 890.
Please answer this problem and post it here.
Generic Collections: Functional Programming with LINQ/PLINO a lambda has lambda operator. o) False. When specifying a lambda parameter's type and/or when re than one parameter, you must enciose the parameter list in parentheses. p) True. Exercises 21.3 (Collections Terminology) Describe each of the following a) ICollection b) Array IL )load factor e) hash-table collision f) space/time trade-off in hashing g) dictionary 21.4 (Enumerator Members) Explain briefly the operation of each of the following enumerat related methoo a) GetEnumerator b) Current c) MoveNext 21.5 (IDictionary ck, vs Methods and Properties) Explain briefly the operation of each of the fol lowing methods and properties of interface IDictionaryExplanation / Answer
Solution:
Note: The first question is done as per Chegg guidelines, please repost others.
21.3
a)
The ICollection interface is the base interface for classes in the System.Collections namespace.
ICollection uses data structures like Stack, Queue, list, and hash.
The ICollection is similar to an array
b)
Array is the continuos memory allocation which is used to allocate the continuous memory to apply some operations.
c)
IList is non-generic collection object that can be individually access by index.
The two interface named as ICollection and IEnumerable are used to implement IList.
d)
load factor is the representation of number of keys required per slot in the hash table.
e)
space is given less priority here because it is considered that time complexity is more important than space complexity that is why most space is used in the hash table to make sure the time complexity of O(1) for search.,
f)
Dictionary is a data structure which is used to store key value pairs.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)