Delete Key Property 4

If "remaining" map is empty, "processed" contains all the entries that were in the original map except the entry with key (if such an entry existed). At this point, the entries in "processed" are in reverse order of the original map, so reverse "processed" to restore the original order. More formally:

output of function delete_entry where input key is key, map is [ ], and processed is kvs = reverse of kvs

Examples

output of function delete_entry where input key is "FL", map is [ ], and processed is [ entry "AZ": "Arizona", [ entry "TX": "Texas", [ ] ] ] = reverse of [ entry "AZ": "Arizona", [ entry "TX": "Texas", [ ] ] ]

Quiz (1 point)

Please fill in the blank:

(result of deleting the entry with key "MT" in remaining entries [ ] and processed entries: [ entry "EST":"Eastern Time", [ entry "CST":"Central Time", [ ] ] ]) = (reverse of _________________

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

Comments

Please log in to add comments