Form every distinct 3-digit even number that can be built from the given digits.
You are given an array of digits. Using each digit at most once per number, form all distinct 3-digit even numbers that can be created from those digits.
A valid number must:
0, andReturn all valid numbers in ascending order.
digits.0 to 9.1 <= digits.length <= 100 <= digits[i] <= 9Example 1
Input
digits = [2,1,3,0]
Output
[102,120,130,132,210,230,302,310,312,320]
Explanation
All distinct 3-digit even numbers that can be built without reusing a digit within the same number are listed in sorted order.
Example 2
Input
digits = [2,2,8,8,2]
Output
[222,228,282,288,822,828,882]
Explanation
Repeated digits may be used if enough copies exist in the input, but duplicates in the output are removed.
Example 3
Input
digits = [5,7,9]
Output
[]
Explanation
No 3-digit even number can be formed because there is no even digit for the units place.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.