Practice · 1 of 3
Parse without allocating
CHALLENGE
Difficulty: advanced+25 XP
Implement static (int a, int b) ParsePair(ReadOnlySpan<char> input) that parses two comma-separated integers from the span WITHOUT allocating any string. No Split, no Substring — slice and parse the span directly. The test measures allocations to prove it.
Press Submit to check your solution.
Back to lesson: Practice: Memory drills