Interview Questions:
Count how many employees have a salary strictly over 30,000
Identify which employee has held their job the longest (using start and end dates—treat missing end dates as “today” and missing start dates as “skip”)
Find the employee with the second-highest salary
You may need to decide how to handle missing names (recommended: use a placeholder like “(unknown)” so the row isn’t dropped for the other queries)
Clarify how to deal with rows that are malformed, have extra or missing fields, or contain blank lines
Explain your data structures and approach as you go (especially performance and edge cases)
Option to use native Python types and modules; pandas probably not available
You don’t have to provide a tie-breaking rule unless asked, but if you do, picking the lexicographically smallest name is reasonable
Overall, strong candidates can:
Parse and clean up messy, inconsistent tabular input
Make and explain reasonable real-world assumptions
Use Python constructs like csv.reader, datetime.fromisoformat, and simple lists/dicts
Communicate their approach and edge-case handling out loud