>Can you describe an algorithm that is O(nm)?
>I'm guessing it would be something like traversing a two-dimensional array.
Good guess. That's an excellent way of describing O(nm).
>The two loops needed to do that is throwing me off however.
>It's making me think that it could be O(n^2).
If it helps, you can think of O(n^2) as O(nn), redundant as it may be. The difference here is that with O(nm), n and m don't have to be the same value. They can be, and in that case the time complexity is indeed quadratic.