• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/5

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

5 Cards in this Set

  • Front
  • Back

What is an array?

A structure of fixed size which can hold items of the same data type.

Is random access possible in an array?

Yes, because they are indexed.

What operations can be performed on an array?

Traverse: go through elements and print them



Search: search for an element in an array. You can search the element by its value or index.



Update: update the value of an existing element at a given index

Can you insert into an array?

Yes but not straight away as arrays are fixed in size. If you want to insert an element you need to first create a new array with increased size, copy the existing elements, then add the new element. Same goes with deletion but you create an array with reduced size.

What are arrays used for?

- used as the building blocks to build other data structures such as array lists, heaps, hash tables, vectors and matrices


- used for different sorting algorithms such as insertion sort, quick sort, bubble sort and merge sort