文件名称:lrucacheleetcode-Algorithm:算法
文件大小:136KB
文件格式:ZIP
更新时间:2024-07-19 16:40:36
系统开源
lru缓存leetcode 算法 LintCode 178 图有效树 The defination of Tree: 1. There will be n - 1 edges for n nodes 2. All the nodes are reached from any node LeetCode 133 克隆图 1. use Map to track the relation between old and new node 2. add neighbors to new node LintCode 127 拓扑排序 1. get indegree map of graph 2. get startNodes of topological sort 3. use bfs get full order Leetcode200 岛屿数量 1. once visited, value of node should be flipped 2. check boundary eveny time BFS: create new Class Coordinate(x, y) DFS: muc