A simple Queue uses FIFO (First In First Out) approach for its deQueue and enQueue operations.Ī priority Queue is a type of Queue that deQueue its elements with their priority. What is a Priority Queue and A Queue?Ī queue is a linear array of data. In this tutorial, we will find the answer to whether can we use a simple queue to implement Dijkstra’s algorithm instead of a Priority Queue. To implement this algorithm we mostly use Priority Queue. In this Python tutorial, we have learned about the priority queue in python.Dijkstra’s Algorithm is used to find the shortest possible distance between two objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |