← Questions

Parse HTML into an element tree and query it

0
AppleCodingLast asked Aug 2026

A coding interview question asked in Apple's coding round, last asked Aug 2026. It tests parsing, trees and dfs.

You are asked to "write an HTML parser". The prompt is deliberately vague: it does not say what the input is, what to return or which edge cases matter.

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

  • Apple · Coding · Last asked Aug 2026

What it tests

parsing · trees · dfs · requirements

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