Search
⌘K

Leetcode 2349. Design a Number Container System

Design a data structure that supports assigning/replacing a number at any index and returning the smallest index that currently contains a given number (or -1 if none). With up to 1e5 operations and index/number values up to 1e9, the challenge is to support efficient updates and min-index queries per number.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.