STRUCTURES & ALGORITHMS 2)
CS DOJO
Introduction to arrays
In this video, we will cover the basics of arrays and give an
overview of how memory works. The video will split into 3 parts:
Basics of arrays
Memory vs storage
Storing integers and integer arrays in memory
An array is a collection of items of a single type, such as integers
or strings. It is not common for an array to have multiple types.
Here is an example of an array of integers:
Int sample Array [ 5] = {2, 4, 6, 8, 100};
You can visualize this array as a box with five partitions, each
containing an integer. The index of the array starts at 0 not 1.
Memory vs Storage
Memory, or RAM, and storage, such as a flash drive or hard disk,
are the two mechanisms for storing data on a computer. The
biggest difference between them is that data on storage is
permanent, while data on memory is not. When you turn off your
computer, the data on memory disappears. Reading and writing
data to storage is slower than to memory. This is why memory is
used as a temporary workspace for data that is being actively