Delete Key Property

Deleting an entry with some key in a map is equivalent to a delete operation that tracks the following:

  • Entries processed so far in the "processed" map (initially empty).
  • Entries remaining in the "remaining" map (initially the same as map)
More formally:

result of deleting the entry with key key from map entries = output of function delete_entry where input key is key, map is entries, and processed is [ ]

Examples

result of deleting the entry with key "FL" from map [ entry "AZ": "Arizona", [ entry "FL": "Florida", [ entry "TX": "Texas", [ ] ] ] ] = output of function delete_entry where input key is "FL", map is [ entry "AZ": "Arizona", [ entry "FL": "Florida", [ entry "TX": "Texas", [ ] ] ] ], and processed is [ ]

Quiz (1 point)

Please fill in the blank:

(result of deleting the entry with key "MT" from map [ entry "CST":"Central Time", [ entry "MT":"Mountain Time", [ ] ] ]) = (result of deleting the entry with key: "MT" in remaining entries: [ entry "CST":"Central Time", [ entry "MT":"Mountain Time", [ ] ] ] and processed entries: __________ )

Become a subscriber to save your progress, see the correct answer, and more!

Comments

Please log in to add comments