Trains the technique from
LeetCode 2094Finding 3-Digit Even NumbersThis is an original problem, written from a brief that listed the technique, the difficulty, the topics, the function shape and the input bounds — none of that problem's wording, examples, hints or editorials. The link is there so you can map your practice onto the standard set.
Same function shape, different story and different numbers.
A tray holds tiles, each stamped with a single digit, given as tiles.
Form three-digit numbers by choosing three tiles and laying them out in some order. No tile may be used more often than the tray holds it, the number may not begin with a zero, and the number must be even.
Return every distinct number obtainable, in increasing order.
Example 1
The three tiles must all be used. Of the six orders, only those ending on 2 or 4 are even, which gives four numbers.
Example 2
Every tile is a zero, so any three-tile number would begin with a zero.
Example 3
Three tiles all stamped 4, so the only number is 444, which is even and does not begin with a zero.
The editor is preloaded with this. It matches the parent problem's shape, so a solution that works here transfers to a judge unchanged.
def find_even_numbers(tiles: list[int]) -> list[int]:public int[] findEvenNumbers(int[] tiles)See the step-by-step animation, the intuition, and clean code in every language — free, no credit card.