Traversing 2D Arrays

AP Computer Science A· difficulty 3/5

Traverse column-by-column:

  • A

    Outer i, inner j

  • B

    Use for-each

  • C

    Cannot do

  • D

    Outer j (cols), inner i (rows)

    check_circle

Explanation

Swap outer and inner: outer iterates columns.

Want 10 more like this — adaptive to your weak spots?

Related questions