← Questions

Split Markdown into chunks that keep their headers

0
SierraCodingLast asked May 2026

A coding interview question asked in Sierra's technical phone screen, last asked May 2026. It tests parsing, strings and chunking.

Split a Markdown document into ordered chunks, each no longer than max_size characters, for example to feed a retrieval index. A header is a line that starts with one to six # characters and a space (# Title, ## Section).

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

parsing · strings · chunking

Your code and the AI tutor open when you unlock this question.