Skip to content
Learnearn.uk » Home » One Dimensional Arrays

One Dimensional Arrays

Introduction

What are 1 dimensional arrays and what are they used for?

1 dimensional arrays are a form of compound data type that are used to store a list of items in order. Sometimes the ordering of items may not be important (such as a shopping list) but sometimes it can be crucial (Names of runners collected as the finish a race).

They are highly useful if you need to:

  • Search through multiple items to see if a particular example exists/fits certain criteria.
  • Perform the same action for each item in the list
  • Need to find out the relative position of various items in the list (for instance find out the difference between the finishing positions or runners in a race)

 

 

 

Arrays vs Lists

Array Terminology

Pseudocode

Python