InterviewDB
Question
Unique Lines: Return Only Lines That Appear Exactly Once in a File Stream
Onsite
Question Details
Problem Given a sequence of lines (strings) from a large file or stream, return all lines that appear exactly once, in the order of their first occurrence. Example: Follow-ups What is the time and space complexity of your approach? Can you do it in a single pass? If the file is too large to fit in memory, what external algorithm or data structure would you use (e.g., external sort, counting Bloom filter)? How does case sensitivity affect your solution, and how would you add a case-insensitive mo…
Full Details
🔒
Unlock all Vanta questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a reported interview question from a vanta interview during the onsite round.