Fixed size refers to a data structure or container whose size cannot be changed once it is created. Once initialized with a specific capacity or length, no additional elements can be added or removed from it.
Think of fixed size like having a tray with predetermined slots for holding items. Once all slots are filled, you cannot add more items or remove any existing ones without replacing them.
Array: A fixed-size data structure in many programming languages that stores elements of the same type in contiguous memory locations.
Stack: A data structure that follows the Last-In-First-Out (LIFO) principle, where elements can only be added or removed from one end called the top.
Queue: A data structure that follows the First-In-First-Out (FIFO) principle, where elements can only be added at one end called the rear and removed from the other end called the front.
Study guides for the entire semester
200k practice questions
Glossary of 50k key terms - memorize important vocab
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.