String / Array Transformation

Problem Parse and transform structured input — normalize records into a consistent shape, deduplicate them, and reshape into the required output. This is a practical, job-like task rather than a puzzle; clean structure, edge-case handling, and tests matter more than a clever trick.

Input / Output

  • Input: a collection of messy/structured records (e.g. CSV or JSON with inconsistent fields).
  • Output: normalized, deduplicated, reshaped records.

Requirements

  • Normalize inconsistent field formats to a canonical form.
  • Deduplicate records by a chosen key.
  • Handle malformed input gracefully rather than crashing.

Areas to design

  • The parsing/validation boundary and how malformed rows are reported or skipped.
  • The dedupe key and how conflicts between duplicate records are resolved.
  • Testability: separating pure transformation logic from IO.

Example

  • messy records → normalized, deduped output.
added …
LeaderboardSalaryAccount