摘要: https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1?view=netframework-4.7.2 Represents a first-in, first-out collection of 阅读全文
posted @ 2019-04-02 23:53 ChuckLu 阅读(165) 评论(0) 推荐(0) 编辑
摘要: https://www.geeksforgeeks.org/bfs-vs-dfs-binary-tree/ What are BFS and DFS for Binary Tree? A Tree is typically traversed in two ways: Breadth First T 阅读全文
posted @ 2019-04-02 21:23 ChuckLu 阅读(414) 评论(0) 推荐(0) 编辑
摘要: Depth-first search Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the roo 阅读全文
posted @ 2019-04-02 21:10 ChuckLu 阅读(926) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree [ 阅读全文
posted @ 2019-04-02 12:54 ChuckLu 阅读(261) 评论(0) 推荐(0) 编辑