Find largest filename from ls -l output
Company: Intuit
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Take-home Project
Quick Answer: This question evaluates proficiency in text parsing, tokenization, and numeric comparison applied to command-line style output, emphasizing robust handling of varied input formats and edge cases.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ('total 8\n-rw-r--r-- 1 me staff 12 Jan 1 12:00 small.txt\n-rw-r--r-- 1 me staff 100 Jan 1 12:01 big file.txt',)
Expected Output: 'big file.txt'
Explanation: File name contains spaces.
Input: ('-rw-r--r-- 1 u g 5 May 1 2025 a\n-rw-r--r-- 1 u g 5 May 1 2025 b',)
Expected Output: 'a'
Explanation: Tie keeps first.
Input: ('total 0',)
Expected Output: ''
Explanation: No file entries.
Hints
- Choose a representation that makes the requested operation direct.
- Handle empty inputs and boundary cases first.