You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Section 1.2.3 of the book. The dictionary/map was compared to the USet interface. One subtle issue here that we won't be able to update the dictionary/map using the add(x) method of USet, since 1) according to the text, two pairs are treated as equal if their keys are equal and 2) the USet add(x) interface states that the element x will be added to the set if not already present.
To create a dictionary/map, one forms compound objects called Pairs, each of which contains a key and a value. Two Pairs are treated as equal if their keys are equal. If we store some pair (k,v) in a USet and then later call the find(x) method using the pair x = (k, null) the result will be y = (k, v). In other words, it is possible to recover the value, v, given only the key, k.
The text was updated successfully, but these errors were encountered:
In Section 1.2.3 of the book. The dictionary/map was compared to the USet interface. One subtle issue here that we won't be able to update the dictionary/map using the add(x) method of USet, since 1) according to the text, two pairs are treated as equal if their keys are equal and 2) the USet add(x) interface states that the element x will be added to the set if not already present.
The text was updated successfully, but these errors were encountered: