Queue

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 objects.

 

https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.peek?view=netframework-4.7.2

Returns the object at the beginning of the Queue<T> without removing it.

 

 

适合用来做广度优先遍历Breadth-first search

posted @ 2019-04-02 23:53  ChuckLu  阅读(165)  评论(0编辑  收藏  举报