Skip to main content

CSV Payload Normalizer

Challenge on lesson: Checkpoint: Files & Formats

Build Solution: - static List<String> parseRow(String line) — the quoted-CSV scanner from the practice (reuse your implementation). - record Record(String name, int qty) in Solution. - static List<Record> normalize(List<String> rows, String header): parse each row with the scanner; SKIP rows that fail numeric parsing of the qty column (index 1); the header row (matching header exactly) is skipped too. Return the records in order. Edge cases: fields may contain quoted commas; qty may have surrounding spaces (trim before parse).

Difficulty: intermediate

Back to lesson: Checkpoint: Files & Formats