Amazon | Onsite | HTML Preprocessor
Anonymous User
606

Create a valid HTML from a Python-like patterned text:
Input:

"tag:html
    tag:div
        Leet
        tag:span
            code
		tag:span
			.com"

Expected Output:

"<html><div>Leet<span>code</span><span>.com</span></div></html>"
  • Each line is either a tag or a text
  • Lines that start with "tag:" demonstrate a tag
Comments (5)