6.4 Developing Algorithms Using Array

Enduring Understanding

Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values.

Learning Objective

For algorithms in the context of a particular specification that requires the use of array traversals:

§ Identify standard algorithms.

§ Modify standard algorithms.

§ Develop an algorithm.

Essential Knowledge

There are standard algorithms that utilize array traversals to:

Determine a minimum or maximum value

  • Compute a sum, average, or mode

  • Determine if at least one element has a particular property

  • Determine if all elements have a particular property

  • Access all consecutive pairs of elements

  • Determine the presence or absence of duplicate elements

  • Determine the number of elements meeting specific criteria

There are standard array algorithms that utilize traversals to:

  • Shift or rotate elements left or right § Reverse the order of the elements

Last updated

Was this helpful?