dynamic data structure
A dynamic data structure (DDS) refers to an organization or collection of data in memory that has the flexibility to grow or shrink in size, enabling a programmer to control exactly how much memory is utilized. Dynamic data structures change in size by having unused memory allocated or de-allocated from the heap as needed.
Dynamic data structures play a key role in programming languages like C, C++ and Java because they provide the programmer with the flexibility to adjust the memory consumption of software programs.
Dynamic Data Structures vs. Static Data Structures
Dynamic data structures stand in contrast to static data structures (SDS), wherein in the case of the latter the size of the structure is fixed. Static data structures are ideal for storing a fixed number of data items, but they lack the dynamic data structure’s flexibility to consume additional memory if needed or free up memory when possible for improved efficiency.
As a result, when the number of data items can’t be predicted beforehand, a dynamic data structure should be used. A potential drawback to using dynamic data structures, though, is that because allocation of memory isn’t fixed, there is the possibility for the structure to overflow if it exceeds the maximum allowed memory limit or underflow if the data structure becomes empty.
To help prevent these issues from occurring, the programmer needs to add control for continually monitoring the size and location of data items in a dynamic data structure.
- Watch Datamation's editor James Maguire moderate roundtable discussions with tech experts from companies such as Accenture, Dell, Blue Jeans Network, Microsoft and more »
Learn about each of the five generations of computers and major technology developments that have led to the current devices that we use today. Read More »Small Business Marketing's Greatest Hits
The following compilation of small business marketing tips highlights some of the expert advice published over at Small Business Computing. Read More »13 Best Free Android Apps
From secure messaging to document editing, our top free must-have apps have been rated, reviewed and named the best free Android apps of 2015. Read More »
With cost and security in mind, we look at five cloud storage options that will suit the needs of most home and SMB owners. Read More »Windows 10 Tips for Desktop PC
Five basic tips to help you customize Windows 10 on your desktop PC. Read More »29 Free Android Apps for Cash-Strapped Students
From wacky alarm clocks to lecture hall tools and after class entertainment, these Android apps are a good fit for a student's life and budget. Read More »