Group Instrument Aliases Across Market Data Vendors
Last updated: November 29, 2026
Quick Overview
Each feed record lists identifiers that refer to the same instrument (vendor code, exchange symbol, internal id). Merge records that share any identifier and return the groups of aliases for each distinct instrument.
Akuna Capital
November 29, 20260
0
0 solved
Each feed record lists identifiers that refer to the same instrument (vendor code, exchange symbol, internal id). Merge records that share any identifier and return the groups of aliases for each distinct instrument.
Akuna Capital consumes options data from several exchanges and vendors, each with its own symbology, and a reference-data bug means quoting the wrong contract. The interviewer looks for union find with path compression, a clear treatment of transitive links, and thoughts on bad data that wrongly joins two instruments.
What the Interviewer Expects
- See that sharing any identifier links records transitively
- Use union find (or BFS over an identifier graph)
- Implement path compression and union by size
- Include singleton records in the output
- Discuss how one bad record can merge two real instruments
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you detect a merged group that is probably wrong (for example, two strikes)?
- How would you support removing a link when a vendor corrects a mapping?
- How would you do this incrementally as new records arrive during the day?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: a list of records, each a list of string identifiers. Two identifiers belong to the same instrument if they appear on the same record, or are linked through a chain of records. Output: sorted g...
High-Level Design
Treat each identifier as a node. Each record unions its first identifier with every other one, which is enough to connect all of them. Union find gives near-constant-time merges and finds. At the end,...