File Explorer

Render a nested list of files and folders as a tree, with folders before files, both sorted by name, and folders that expand on click.

Asked in frontend interviews at Apple, Waymo and Quince