topological sort
老晨磕技术
每天定时定量,持之以恒。一天一点数十年持续积累,坚持的人总不会混得太差。
展开
-
晨哥Leetcode 207. Course Schedule 拓扑排序套路
There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair...原创 2019-09-13 09:03:14 · 120 阅读 · 0 评论 -
晨哥Leetcode 269. Alien Dictionary
There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of non-empty words from the dictionary, where words are sorted lex...原创 2019-09-13 11:23:14 · 104 阅读 · 0 评论