PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Intuit

Find largest filename from ls -l output

Last updated: May 27, 2026

Quick Overview

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.

  • medium
  • Intuit
  • Coding & Algorithms
  • Software Engineer

Find largest filename from ls -l output

Company: Intuit

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Take-home Project

You are given a multi-line string (via stdin) that represents the output of `ls -l`, with one entry per line. Each file line follows the typical `ls -l` format: `<mode> <links> <owner> <group> <size> <month> <day> <time_or_year> <name...>` Task: print the **file name** (the `<name...>` part) of the entry with the **largest `<size>`**. Requirements: - Correctly parse columns so that you read the numeric `size` field. - File names may contain spaces, so you cannot assume the name is a single token. - Ignore non-entry lines such as `total N` if present. Output only the file name of the largest file (any tie-breaking is acceptable unless otherwise specified).

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.

Related Interview Questions

  • Add One to Digit Array - Intuit (easy)
  • Find Business Degrees of Separation - Intuit (hard)
  • Validate bracket sequence - Intuit (easy)
  • Produce valid student lineup from parent array - Intuit (medium)
  • Sum palindrome-change costs over all substrings - Intuit (medium)
Intuit logo
Intuit
Oct 13, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
3
0

You are given a multi-line string (via stdin) that represents the output of ls -l, with one entry per line.

Each file line follows the typical ls -l format:

<mode> <links> <owner> <group> <size> <month> <day> <time_or_year> <name...>

Task: print the file name (the <name...> part) of the entry with the largest <size>.

Requirements:

  • Correctly parse columns so that you read the numeric size field.
  • File names may contain spaces, so you cannot assume the name is a single token.
  • Ignore non-entry lines such as total N if present.

Output only the file name of the largest file (any tie-breaking is acceptable unless otherwise specified).

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Intuit•More Software Engineer•Intuit Software Engineer•Intuit Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.