Choose based on dataset size and requirements.
Client-side filtering:
- Load all options upfront
- Filter in JavaScript
- Good for small datasets (under , items)
- Instant response, no network latency
Server-side filtering:
- Query server with search term
- Server returns filtered results
- Required for large datasets
- Handles complex matching (fuzzy, ranked)
Hybrid: Cache common queries client-side, fetch for uncommon ones.
Interview tip: State your assumption about dataset size and justify your choice.