← All problemsSign in

2225. Find Players With Zero or One Losses

LeetCodeArrayHash TableSortingCountingOpen on judge ↗

You are given an integer array matches where matches[i] = [winneri, loseri] indicates that the player winneri defeated player loseri in a match. Return a list answer of size 2 where: - answer[0] is a list of all players that have not lost any matches. - answer[1] is a list of all players that have lost exactly one match. The values in the two lists should be returned in increasing order. Note

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start