Hi, how can i create a priority queue in C that compares the values of an entry and displays the entry with the lowest value first? Please help me!!!!!!!
email me if u have any help
Thanx
Hi, how can i create a priority queue in C that compares the values of an entry and displays the entry with the lowest value first? Please help me!!!!!!!
email me if u have any help
Thanx
Simple, just take input, and add it to a linked list so that the lowest entry is always on top. (Thus, if you call something like a 'pop' function, it'll give you the lowest one.)
I'd personally use a double linked list, because they're so much easier for this sort of thing than a single linked list.
Quzah.