Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Associative array
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Properties=== The operations of the associative array should satisfy various properties:<ref name="Black">{{cite web |last1=Black |first1=Paul E. |last2=Stewart |first2=Rob |title=dictionary |url=https://xlinux.nist.gov/dads/HTML/dictionary.html |website=Dictionary of Algorithms and Data Structures |access-date=26 January 2022 |date=2 November 2020}}</ref> * <code>lookup(k, insert(j, v, D)) = if k == j then v else lookup(k, D)</code> * <code>lookup(k, new()) = fail</code>, where <code>fail</code> is an exception or default value * <code>remove(k, insert(j, v, D)) = if k == j then remove(k, D) else insert(j, v, remove(k, D))</code> * <code>remove(k, new()) = new()</code> where <code>k</code> and <code>j</code> are keys, <code>v</code> is a value, <code>D</code> is an associative array, and <code>new()</code> creates a new, empty associative array.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)