📃
Julianne's Knowledge Base
  • README
  • Home
    • Computer Science and Programming
      • Data Structures
        • Array
        • Binary Heap
        • Binary Tree
        • Deque
        • Dynamic Array
        • Graph
        • Hash Table
        • Linked List
        • Queue
        • Stack
      • Databases
        • Database Normalization
      • Networking
        • IP Protocol
        • Network Devices
        • OSI Model and TCP/IP
        • Ethernet LAN Switching
        • IPv4 Addressing
        • Sockets
      • Operating Systems
        • UNIX Operating Systems
          • Fundamentals
            • Virtualization
              • CPU Virtualization
              • Processes
            • Processes
          • xv6
      • Software Development
        • General Tips
        • My Goals as a Software Developer
        • Programming Languages
          • C
            • Memory Management in C
          • C++
            • I/O in C++
            • Iterators
            • Memory Management in C++
          • Javascript/TypeScript
            • Inheritance
            • React
            • Useful Libraries
          • Python
        • Tools
          • GDB
          • Git
    • Cooking
      • Diet and Nutrition
      • Recipes
    • Languages
      • Japanese
        • Grammar
        • Numbers and Counting
    • Productivity
      • Getting Things Done (GTD)
      • My GTD Trigger List
      • My Personal Knowledge Management System
      • Obsidian
        • Plugins
        • Using Obsidian
Powered by GitBook
On this page
  • Dynamic Arrays
  • 2D Arrays
  1. Home
  2. Computer Science and Programming
  3. Data Structures

Array

Arrays are basic data structures used to store collections of data sequentially.

Features of arrays are:

  • Elements can be accessed randomly (identified by indexes)

  • Can have one or more dimensions

  • Fixed capacity

The capacity of an array is the maximum number of items it can hold. The length is the number of items in the array.

The capacity of an array is specified when it is created. The memory needed for the maximum size of the array is reserved, regardless of the number of items in it. The default value of empty array indexes is language-specific.

Dynamic Arrays

Dynamic arrays are the same as arrays, but with variable capacity. An example of this is the vector type in C++.

2D Arrays

2D arrays are used to represent rectangular grids. They are usually implemented as an array of arrays.

In some languages, these are implemented internally as one-dimensional arrays, and in some others there's no multidimensional arrays at all.

PreviousData StructuresNextBinary Heap

Last updated 4 years ago