Available Sizes

The same clothing size may be stored in several warehouses, but the customer should see each available size only once. Given a list warehouses, where each warehouse contains a list of sizes, collect all sizes that appear in at least one warehouse. Return the unique sizes sorted in ascending order.

Примеры

Ввод
[[38, 40], [40, 42]]
Вывод
[38, 40, 42]
Ввод
[]
Вывод
[]
Ввод
[[44]]
Вывод
[44]

Нужно реализовать

def available_sizes(warehouses: list) -> list:

Теги

setsortinglists
PostgreSQLv16

Taispeánfar toradh do chóid anseo

Visible tests
1
Input
[[38,40],[40,42]]
Expected[38,40,42]
2
Input
[]
Expected[]
3
Input
[[44]]
Expected[44]
4
Input
[[36,38],[],[38,36]]
Expected[36,38]
5
Input
[[42,40,38]]
Expected[38,40,42]
6
Input
[[1],[2],[3],[1,2,3]]
Expected[1,2,3]
Focus radio
Paused · SomaFM · Fluid