Explain the use of slicing and indexing with NumPy arrays, including basic vs. advanced indexing.
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how basic slicing and advanced indexing work on NumPy arrays, including integer-array and boolean-mask selection. It tests whether you know which operations return views and which return copies, and how that affects assignment and chained indexing.