摘要: 1.出度为0则为满足条件的节点,取所有出度为0的到queue中,之后循环减去这些队列中的出度,正反索引减少访问时间 class Solution { public: vector<int> eventualSafeNodes(vector<vector<int>>& graph) { vector< 阅读全文
posted @ 2021-05-14 14:57 巴啦啦大魔王 阅读(30) 评论(0) 推荐(0) 编辑