Webopedia on Google+Webopedia on TwitterWebopedia on FacebookTech Bytes Blog
Main » TERM » L »

linked list

A method of organizing stored data in a computer��s memory or on a storage medium based on the logical order of the data and not the physical order. All stored data records are assigned a physical address in memory that the computer uses to locate the information. A linked list arranges the data by logic rather than by physical address.

In the table below, each data record is assigned a memory address, and each record has five fields that contain data. The first field holds the physical memory address of the record and the last field holds the physical memory address of the next logical record. The data is organized numerically based on the ID field, and the list is linked because each record is linked to the next based on that last field.

Address of Record ID Name Phone Number Next Name
0000 1111 Adams 265-8943 5500
5500 3333 Johnson 465-7219 6000
6000 4444 Smith 421-6307 8200
8200 5555 Murphy 720-9437 eof (end of file)

If a new record is added to the list, with a numerical ID of "2222," it will be assigned an available physical address that may not be adjacent to the physical memory address of the record that precedes or comes after it numerically (1111 or 3333 in this case). When this record is added to the list, the list changes to reflect the new linking logic, based on the numerical ID. Note how the "Next Name" field changes for ID 1111 to accommodate the added record with ID 2222.

Address of Record ID Name Phone Number Next Name
0000 1111 Adams 265-8943 9672
9672 2222 Jones 481-9698 5500
5500 3333 Johnson 465-7219 6000
6000 4444 Smith 421-6307 8200
8200 5555 Murphy 720-9437 eof

Linked lists are used to organize data in specific desired logical orders, independent of the memory address each record is assigned to. In the above example, the data is organized numerically by the ID number. In the table below, the same data is organized alphabetically by name. Notice how the linked list still connects each record to the next using the "Next Name" field.

Address of Record ID Name Phone Number Next Name
0000 1111 Adams 265-8943 5500
5500 3333 Johnson 465-7219 9672
9672 2222 Jones 481-9698 8200
8200 5555 Murphy 720-9437 6000
6000 4444 Smith 421-6307 eof

Linked list data storage works best with data arrays in which one doesn��t know how large the array will need to be or when there is a certainty of more data being added or subtracted at later times. A disadvantage to linked list data storage is that the data must be accessed sequentially and cannot be accessed randomly. Some common applications of linked lists include creating hash tables for collision resolutionn across communication channels, structuring binary trees, building stacks and queues in programming, and managing relational databases.







TECH RESOURCES FROM OUR PARTNERS
DID YOU KNOW?
Hype Versus Action in the Developer's World

Often times technologies start as hype but with time become adopted. As a developer or technologist, it is worth reading the hype and knowing the... Read More »

Microsoft Hyper-V Network Virtualization Q&A

The top 5 Hyper-V questions with answers provided by Nirmal Sharma, a MCSEx3, MCITP and Microsoft MVP in Directory Services. Read More »

Storage Trends: Solid State and Software Defined

Solid state drives and software defined storage are two leading trends in the rapidly growing storage market.  Read More »

QUICK REFERENCE
How to Create a Desktop Shortcut to a Website

Creating desktop shortcuts to a websites is useful. When you double-click the icon from your desktop it automatically launches the browser and... Read More »

Flash Data Storage Vendor Trends

Although it is almost impossible to keep up with the pace of ongoing product releases, here are three recent highlights in the flash data storage... Read More »

15 Important Big Data Facts for IT Professionals

Keeping track of big data trends, research and statistics gives IT professionals  a solid foundation to plan big data projects. Here are 15... Read More »