代码改变世界

阅读排行榜

Directed Graph Loop detection and if not have, path to print all path.

2018-07-08 10:46 by Johnson_强生仔仔, 451 阅读, 收藏,
摘要: 这里总结针对一个并不一定所有点都连通的general directed graph, 去判断graph里面是否有loop存在, 收到启发是因为做了[LeetCode] 207 Course Schedule_Medium tag: BFS, DFS, 这个题实际上就是监测directed graph 阅读全文

[LeetCode] 785. Is Graph Bipartite?_Medium tag: DFS, BFS

2018-07-06 09:25 by Johnson_强生仔仔, 422 阅读, 收藏,
摘要: Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it's set of nodes into two ind 阅读全文

[LeetCode] 301. Remove Invalid Parentheses_Hard tag:BFS

2018-07-09 10:40 by Johnson_强生仔仔, 414 阅读, 收藏,
摘要: Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont 阅读全文

[LeetCode] 851. Loud and Rich_ Medium tag: DFS

2018-07-13 04:55 by Johnson_强生仔仔, 406 阅读, 收藏,
摘要: In a group of N people (labelled 0, 1, 2, ..., N-1), each person has different amounts of money, and different levels of quietness. For convenience, w 阅读全文

[LeetCode] 613. Shortest Distance in a Line_Easy tag: SQL

2018-08-28 23:53 by Johnson_强生仔仔, 401 阅读, 收藏,
摘要: Table point holds the x coordinate of some points on x-axis in a plane, which are all integers. Write a query to find the shortest distance between tw 阅读全文
上一页 1 2 3 4 5 6 7 8 9 10 ··· 78 下一页