Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map operations #20

Open
xXenvy opened this issue Jun 4, 2024 · 0 comments
Open

Map operations #20

xXenvy opened this issue Jun 4, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@xXenvy
Copy link
Contributor

xXenvy commented Jun 4, 2024

1. Remove

REMOVE key

Description:
This operation removes the key-value pair associated with the given key from the hash map. If the key does not exist in the hash map, the operation may return an error.

Time Complexity: O(N) where N is the length of the map. Setting either the first or the last element of the map is O(1).

2. Get

GET key

Description:
This operation retrieves the value associated with the given key from the hash map. If the key does not exist, it may return a default value, null, or an error.

Time Complexity: O(N) where N is the length of the map. Setting either the first or the last element of the map is O(1).

3. Contains

CONTAINS key

Description:
This operation checks whether the given key exists in the hash map. It returns a boolean value indicating the presence or absence of the key.

Time Complexity: O(N) where N is the length of the map. Setting either the first or the last element of the map is O(1).

4. Put

PUT key value

Description:
This operation inserts the value associated with the given key in the hash map.

Time Complexity: O(N) where N is the length of the map. Setting either the first or the last element of the map is O(1).

@sectasy0 sectasy0 added the enhancement New feature or request label Jun 6, 2024
@sectasy0 sectasy0 added this to the 0.2.0 milestone Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants