{
  "title": "Original coding assistant evaluation, not a company interview",
  "language": "Python 3",
  "task": "Return an execution order for unique string task IDs. Each dependency [before, after] requires before to occur earlier. Count duplicate dependencies once. Raise ValueError for a directed cycle. Do not modify the inputs.",
  "baseline": "Any valid order is acceptable.",
  "follow_up": "Now return the lexicographically smallest valid order. Explain what changed and the time and space complexity.",
  "cases": [
    {
      "tasks": [
        "z",
        "a",
        "b"
      ],
      "dependencies": [
        [
          "a",
          "b"
        ]
      ],
      "one_valid_baseline": [
        "z",
        "a",
        "b"
      ],
      "follow_up_expected": [
        "a",
        "b",
        "z"
      ]
    },
    {
      "tasks": [
        "z",
        "a",
        "b"
      ],
      "dependencies": [
        [
          "a",
          "b"
        ],
        [
          "a",
          "b"
        ]
      ],
      "follow_up_expected": [
        "a",
        "b",
        "z"
      ]
    },
    {
      "tasks": [
        "z",
        "a",
        "b"
      ],
      "dependencies": [
        [
          "a",
          "b"
        ],
        [
          "b",
          "a"
        ]
      ],
      "expected_error": "ValueError"
    },
    {
      "tasks": [],
      "dependencies": [],
      "follow_up_expected": []
    }
  ],
  "capture": "Save submitted statement, constraints and follow-up separately; retain full output and code. A typed follow-up does not validate audio capture.",
  "timing": "Record end of question to first useful output separately from time to a complete answer. Do not compare one fastest sample."
}