When NOT to Use

Avoid forcing this pattern

Avoid forcing this pattern when:

  • Random access needed: Use arrays when you need O(1)O(1) access by index.
  • Memory locality matters: Array elements are contiguous; linked list nodes are scattered, causing cache misses.
  • Simple iteration only: If you're just iterating once, array is simpler. Remember: forcing a pattern where it doesn't fit leads to overcomplicated solutions.

If you find yourself fighting the approach, step back and reconsider whether another technique works better.