{
  "name": "evalseal-demo-12",
  "version": "1.0.0",
  "description": "Twelve small deterministic programming tasks with hidden cases. Frozen: the harness hashes this file before every run.",
  "grading": "A task passes only if every case matches exactly. Any exception is a failure.",
  "tasks": [
    {
      "id": "t01_reverse_words",
      "prompt": "Reverse the order of words in a string, collapsing runs of whitespace and stripping the ends.",
      "cases": [
        [["the sky  is blue"], "blue is sky the"],
        [["  hello world  "], "world hello"],
        [["a"], "a"]
      ]
    },
    {
      "id": "t02_roman_to_int",
      "prompt": "Convert a Roman numeral string to an integer.",
      "cases": [
        [["III"], 3],
        [["LVIII"], 58],
        [["MCMXCIV"], 1994],
        [["XLIX"], 49]
      ]
    },
    {
      "id": "t03_balanced",
      "prompt": "Return whether brackets ()[]{} in the string are balanced and correctly nested.",
      "cases": [
        [["([]{})"], true],
        [["([)]"], false],
        [[""], true],
        [["("], false]
      ]
    },
    {
      "id": "t04_rle",
      "prompt": "Run-length encode a string as character followed by count.",
      "cases": [
        [["aaabbc"], "a3b2c1"],
        [[""], ""],
        [["abc"], "a1b1c1"]
      ]
    },
    {
      "id": "t05_binary_search",
      "prompt": "Return the index of the target in a sorted list, or -1 if absent.",
      "cases": [
        [[[1, 3, 5, 7, 9], 7], 3],
        [[[1, 3, 5, 7, 9], 4], -1],
        [[[], 1], -1]
      ]
    },
    {
      "id": "t06_merge_intervals",
      "prompt": "Merge overlapping intervals. Intervals that touch at an endpoint also merge.",
      "cases": [
        [[[[1, 3], [2, 6], [8, 10]]], [[1, 6], [8, 10]]],
        [[[[1, 2], [2, 3]]], [[1, 3]]],
        [[[]], []]
      ]
    },
    {
      "id": "t07_is_palindrome",
      "prompt": "Return whether the string is a palindrome, considering alphanumerics only, case-insensitively.",
      "cases": [
        [["A man, a plan, a canal: Panama"], true],
        [["race a car"], false],
        [[""], true]
      ]
    },
    {
      "id": "t08_top_words",
      "prompt": "Return the k most frequent whitespace-separated words as [word, count] pairs, ties broken alphabetically.",
      "cases": [
        [["the day is the day", 2], [["day", 2], ["the", 2]]],
        [["a b b c c c", 1], [["c", 3]]]
      ]
    },
    {
      "id": "t09_flatten",
      "prompt": "Flatten an arbitrarily nested list of integers into a flat list.",
      "cases": [
        [[[1, [2, [3, [4]]], 5]], [1, 2, 3, 4, 5]],
        [[[]], []]
      ]
    },
    {
      "id": "t10_base_convert",
      "prompt": "Convert a non-negative integer to a string in the given base (2-16), using lowercase digits.",
      "cases": [
        [[255, 16], "ff"],
        [[0, 2], "0"],
        [[10, 2], "1010"]
      ]
    },
    {
      "id": "t11_common_prefix",
      "prompt": "Return the longest common prefix of a list of strings.",
      "cases": [
        [[["flower", "flow", "flight"]], "fl"],
        [[["dog", "racecar"]], ""],
        [[[]], ""]
      ]
    },
    {
      "id": "t12_next_permutation",
      "prompt": "Return the next lexicographic permutation of a list, wrapping to the smallest permutation when already largest.",
      "cases": [
        [[[1, 2, 3]], [1, 3, 2]],
        [[[3, 2, 1]], [1, 2, 3]],
        [[[1, 1, 5]], [1, 5, 1]]
      ]
    }
  ]
}
