.NET & C# · Web API
How would you answer an interview scenario involving pagination, filtering, and sorting in Web API?
For millions of records, I would keep page sizes bounded, whitelist supported filters and sort fields, and require deterministic ordering with a unique tie-breaker. Offset pagination is acceptable for shallow navigation, but for deep or continuously changing datasets I would prefer cursor or keyset pagination. I would also index fields used by common filters and ordering and return paging metadata or continuation tokens appropriate to the contract.