File Directories

A file directory (or folder) is a special-purpose file that records information about other files and possibly other directories. The directory consists of a set of entries, each containing the name of a file followed by other information necessary to access the file. Directories and folders are technically different, especially under Windows. Windows provides other information about folders,…

Files

Files present a way to store persistent data (that is data that doesn’t go away when a computer is either intentionally, or unintentionally, turned off). Older systems relied on tape, then magnetic disks, and now solid state media. A file system is used by the OS to manager and track the files on the media….

Priority Queues

In the real world, while we might say we’re using a queue, there are those who can, and will, skip ahead of members already in the queue. Now, I’m not talking about skipping ahead of a person, like a line skipper in elementary school. A simple example you might think of using a queue, is…

Programming a Queue

As a programmer, you only have to worry about the top element in the queue and the last element. This is because you will enqueue, or add items to the end of the queue, and dequeue, or remove the first, or top, element of the queue. When you add an item to the queue, you…

How Queues Work

A queue is a fairly common data storage method. However, unlike many methods of storing data, where we keep the data for the entire runtime of a function or even the entire application, a queue’s data is designed to be consumable. That is, at some point data will enter the queue, and then it will…

Stacks in Computers

Stacks don’t have as much use in computers as a queue, however, when you need to use one, they are very beneficial. Two of the most common uses of stacks are to help with Expression Conversion (Infix to Postfix, Postfix to Prefix, etc.) and especially with the parsing of data.  When parsing source files before…