Data Structure
The term data structure is relevant to computer programming. Data structure refers to a scheme for organizing related pieces of information, usually in memory. Organized data structure makes searching and other manipulations of the data easier and more fruitful. The main types of data structures are files, lists (such as linked lists), arrays, queues, stacks, heaps, records, trees, and, tables.
A file is a collection of data that has been identified with a name. Virtually all information stored in a computer is in a file, be it data files, text files, program files, directory files, or other files. The different types of files store different types of information.
A list is a set of items that have been grouped together. These are accessible one after the other in a sequential order. In a linked list, the items are formally linked together.
An array consists of a series of objects that are the same in size and type. Each object can also be called an array element. While each element in an array is of the same data type--integers or characters, for example--their values can be different. The entire array is stored in memory with no gaps between elements. This is termed contiguous storage. Arrays can have more than one dimension. A one-dimensional array is called a vector. A two-dimensional array, such as a spreadsheet, is called a matrix.
A queue and a stack both represent a list of items. In a queue only the item that has just been added to the tail of the queue can be accessed. In contrast, in a stack the latest entry is at the beginning, or the head, of the list. If an item is to be deleted from both a queue or a stack, it must be at the head of the queue.
A heap is a type of tree where every node of the tree represents a categorical division from the parent. The division can be more or less related to the parent piece of data. In a tree data structure, each data element is attached to one or more elements directly beneath it. Consistent with the analogy, the connections are termed branches. Elements from which branches emit are termed nodes. The data elements at the bottom, which do not have elements below them, are called leaves. The entire structure looks like a pyramid, or an inverted tree, with the roots at the top and the tips of the branches at the bottom. Data trees are used to organize hierarchical files--the leaves being files and the elements above them being directories.
A table is an arrangement of data where rows and columns are present. Spreadsheets represent data tables, as does a so-called relational database.
This is the complete article, containing 447 words
(approx. 1 page at 300 words per page).