Array

An array is simply a collection of things. These things are usually called elements. They can be made up of numbers, text, or other types. Arrays are widely used in programming to store information.

Arrays are zero-indexed, meaning that the first element starts at index 0 and increments by 1 for each element after it. They are used to access an element. Think of them as ID tags for the elements.

You can drag and drop each element of the array below!

Current Array: 1, 2, 3, 4, 5
Question: Given an array of integers, drag and drop the elements to move all even numbers to the beginning of the array while maintaining their relative order, and all odd numbers to the end of the array.
Current Array: 1, 2, 3, 4, 5