Back to problems

Dependency Ordering With Topological Sort

Algorithm · Roblox · Hard

Problem Overview You receive dependency declarations in a two-dimensional string array. For each row, the first string requires every string that follows it. Produce an ordering in which each required item occurs before the item that requires it. This is a Course Schedule II–style installation-dependency problem with these differences: Items are represented by strings rather than integer course identifiers. The input is a two-dimensional array instead of a list of…

Checking your access…