Maximum Book Copies After Each Update
Asked at Amazon · Coding Questions · Difficulty: Medium
`portal_update[i]` is a non-zero integer: a positive `id` adds a copy of book `id`, a negative `-id` removes one copy of book `id`. After each update return the maximum number of copies held by any single book.
Loading the problem…