Skip to content

Day 358 #707

Closed
Closed

Description

@vaskoz

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 value 1. If the key already exists, increment its value by one.
  • minus: Decrement the value of a key. If the key's value is currently 1, remove it.
  • get_max: Return a key with the highest value.
  • get_min: Return a key with the lowest value.

Activity

  1. self-assigned this
    on Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions