1
如何製作此排序算法?按層次結構算法排序
modules = {
2:[4], # element 2 must be after element 4
1:[],
3:[2,4], # element 3 must be after 2 and 3 elements
4:[1] # element 4 must be after element 1
}
結果[1, 4, 2, 3]
的條件。
如果這是HW,請將其標記爲 – Pepe