-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Good morning! Here's your coding interview problem for today.
This problem was asked by Dropbox.
Create a data structure that performs all the following operations in O(1) time:
plus: Add a key with value1. If the key already exists, increment its value by one.minus: Decrement the value of a key. If the key's value is currently1, remove it.get_max: Return a key with the highest value.get_min: Return a key with the lowest value.
Metadata
Metadata
Assignees
Labels
No labels