Count Groups
Asked at Twilio · Coding Questions · Difficulty: Medium
Twilio's IT team is trying to send two new USB Cables to all the Software Engineers. The problem is that there are a lot of USB standards and they are mostly not compatible with each other. For this reason, the team has labeled all the `n` cables with a numerical tag. They come in a list of tags like `tags = [0, 1, 2, ...]` where the `ith` cable has the tag `tags[i]`. For example, if `tags = [2, 3, 1, 2]`, the cable number 2 would have the tag 3.
Loading the problem…