← 返回 sofi 的题目列表GIF Info Pagination by Tag
类型:qbank
Parse a flat list of GIF records, deduplicate records, filter by tag, and return a specific page while preserving the original input order.
Requirements
Input is a flat List<String> whose order is fixed in triples: id, name, tag, then the next GIF's id, name, tag.
Implement a function that accepts a target tag and page.
Deduplicate GIF records before pagination.
Return all GIF records matching the target tag on the requested page.
Preserve the same relative order as the original input.
Notes
One onsite variant forced Java initially, then allowed another language after the candidate asked.
The prompt is easy to overcomplicate; the important parts are parsing triples correctly, preserving stable order after deduplication, and making pagination boundaries explicit.