Search
⌘K

Leetcode 2766. Relocate Marbles

Given initial marble positions, apply each move that relocates all marbles at position moveFrom[i] to moveTo[i], and return the sorted list of occupied positions after all moves. The key is efficiently tracking unique occupied positions through up to 1e5 moves with coordinates up to 1e9.

Asked at:

ServiceTitan

ServiceTitan


Question Timeline

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

Early December, 2025

ServiceTitan

ServiceTitan

Staff

Comments

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