![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FkYlq7%2FbtsMa7Mg7el%2FuX6nXawbpF7RYOl9GDrN50%2Fimg.png)
[LeetCode] 3160. Find the Number of Distinct Colors Among the Balls (Python)
·
알고리즘/LeetCode
난이도: Medium문제 설명You are given an integer limit and a 2D array queries of size n x 2. There are limit + 1 balls with distinct labels in the range [0, limit]. Initially, all balls are uncolored. For every query in queries that is of the form [x, y], you mark ball x with the color y. After each query, you need to find the number of distinct colors among the balls. Return an array result of length n..