can a stack act as a queu or does it has to be last in first out?
i am trying to make a program, using Huffman`s compression theory, and i am using stack, while its explained using a queu...i want to know if this can be done...
thanks in advance ;)
amir808
0
Newbie Poster
Recommended Answers
Jump to PostA stack is: last in / first out
A queue is: first in / first out
Jump to PostThe purpose of the queue is to ensure the elements are given treatment in the order they were received.
The intended purpose is really the difference.
In actuality, you can do anything you want with either given enough memory and a proper algorithm.
...but I'm sure that's …
All 6 Replies
thines01
401
Postaholic
Team Colleague
Featured Poster
amir808
0
Newbie Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
amir808
0
Newbie Poster
amir808
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.