#3528
Unit Conversion I
specialist · 825 · lc medium +31 · 54.3% accepted · 42 likes · top 47%
Description
There are n unit types (indexed 0 to n-1). Conversions form a tree: conversions[i] = [source, target, factor] means 1 unit of source equals factor units of target.
Return array baseUnitConversion where entry i is how many units of type i equal one unit of type 0, modulo 109 + 7.
Code
1
2
3