id stringlengths 22 22 | messages listlengths 2 2 | meta dict |
|---|---|---|
codedebug-train-000300 | [
{
"role": "user",
"content": "My solution crashes: `longest_increasing([7])` should return `1`, but it raises `IndexError: list assignment index out of range`. What is wrong?\n\nTask: Return the length of the longest subsequence of `nums` (not necessarily contiguous) that is non-decreasing (equal neighbours... | {
"kind": "code.debug.cmp_flip.lis",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "longest_increasing",
"checked_by": "buggy code fails on [[7]]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "53e040dea565",
... |
codedebug-train-000301 | [
{
"role": "user",
"content": "Kun ajan `lis_length([4])`, ohjelma kaatuu tällä virheilmoituksella. Mistä on kyse ja miten korjaan sen?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 14, in <module>\n lis_length([4])\n ~~~~~~~~~~^^^^^\n File \"solution.py\", line 7, in lis_le... | {
"kind": "code.debug.drop_stmt.lis",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 7,
"entry": "lis_length",
"checked_by": "buggy code fails on [[4]]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "a9b07ae35241",
"... |
codedebug-train-000302 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `shortest_distances(3, [[0, 1, 2], [0, 1, 1], [1, 1, 4]], 0)` should be `[0, 1, -1]`, I get `[0, -2, -1]`. What's wrong?\n\nTask: A directed graph has `n` nodes (0..n-1) and edges `[u, v, w]` from `u` to `v` with weight `w >= 1`. Return a lis... | {
"kind": "code.debug.arith_flip.dijkstra",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 17,
"entry": "shortest_distances",
"checked_by": "buggy code fails on [3, [[0, 1, 2], [0, 1, 1], [1, 1, 4]], 0]...; fix == verified reference (oracle-checked on 19... |
codedebug-train-000303 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: You are given intervals `[start, end]` with `start < end`. Return the smallest number of intervals to remove so that the rest do not overlap. Intervals that only touch... | {
"kind": "code.debug.cmp_flip.interval_greedy",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 4,
"entry": "min_removals",
"checked_by": "buggy code fails on [[[1, 2], [2, 3]]]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_i... |
codedebug-train-000304 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `unique_paths(['...###', '......', '#..#..', '....#.'])` should be `6`, I get `0`. What's wrong?\n\nTask: The grid is a list of strings of '.' (open) and '#' (blocked). Starting at the top-left cell and moving only right or down, how many pat... | {
"kind": "code.debug.index_swap.grid_paths",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "unique_paths",
"checked_by": "buggy code fails on [[\"...###\", \"......\", \"#..#..\", \"....#.\"]]...; fix == verified reference (oracle-checked o... |
codedebug-train-000305 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `min_word_split('bcbc', ['bc'])` returns `-1` instead of `2`. Find and fix the bug.\n\nTask: Return the smallest number of words from `words` that concatenate to exactly `s` (each word can be used any number of times), or -1 if it i... | {
"kind": "code.debug.arith_flip.word_break",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 9,
"entry": "min_word_split",
"checked_by": "buggy code fails on [\"bcbc\", [\"bc\"]]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id... |
codedebug-train-000306 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `is_balanced('{]')` pitäisi olla `False`, saan `True`. Mikä on vialla?\n\nTehtävä: Palauta True, jos jokainen `(`, `[` ja `{` merkkijonossa `s` suljetaan oikealla sulkeella oikeassa järjestyksessä, muuten False. Muut merkit ohitetaan.\n\n```p... | {
"kind": "code.debug.cmp_flip.brackets",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "is_balanced",
"checked_by": "buggy code fails on [\"{]\"]...; fix == verified reference (oracle-checked on 22 inputs)",
"problem_id": "9719044729f6",
... |
codedebug-train-000307 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: A robot starts at (0, 0) facing north. Commands: `-2` turns left 90°, `-1` turns right 90°, and `k` (1-9) moves forward k unit steps. If the next square is an obstacle... | {
"kind": "code.debug.cmp_flip.robot_walk",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 9,
"entry": "robot_max_distance",
"checked_by": "buggy code fails on [[-2, 3], []]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": ... |
codedebug-train-000308 | [
{
"role": "user",
"content": "Here is my solution. Something is wrong but I can't see it. Can you find the bug?\n\nTask: Return the length of the longest string that appears as a contiguous substring in both `a` and `b`. Both strings can be over a thousand characters long.\n\n```python\ndef common_substring... | {
"kind": "code.debug.drop_stmt.common_sequence",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 11,
"entry": "common_substring_len",
"checked_by": "buggy code fails on [\"abc\", \"abc\"]...; fix == verified reference (oracle-checked on 20 inputs)",
... |
codedebug-train-000309 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `trade_with_cooldown([1, 2, 3, 0, 2])` should be `3`, I get `1`. What's wrong?\n\nTask: `prices[i]` is the price of a share on day `i`. You may complete as many trades as you like, holding at most one share at a time, but after a sale you can... | {
"kind": "code.debug.minmax_swap.stock_profit",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 4,
"entry": "trade_with_cooldown",
"checked_by": "buggy code fails on [[1, 2, 3, 0, 2]]...; fix == verified reference (oracle-checked on 19 inputs)",
"probl... |
codedebug-train-000310 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `longest_k_distinct('abc', 0)` pitäisi olla `0`, saan `3`. Mikä on vialla?\n\nTehtävä: Palauta merkkijonon `s` pisimmän sellaisen osajonon pituus, jossa on enintään `k` eri merkkiä (`k >= 0`). `s` voi olla satojatuhansia merkkejä pitkä.\n\n``... | {
"kind": "code.debug.drop_stmt.longest_window",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "longest_k_distinct",
"checked_by": "buggy code fails on [\"abc\", 0]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id"... |
codedebug-train-000311 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: `s` contains only `(` and `)`. Return the minimum number of parentheses you must insert (anywhere) to make it balanced.\n\n```python\ndef fix_parens(s: str) -> int:\n ... | {
"kind": "code.debug.init_change.brackets",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 2,
"entry": "fix_parens",
"checked_by": "buggy code fails on [\"\"]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "f26917dfccd0"... |
codedebug-train-000312 | [
{
"role": "user",
"content": "Running `longest_k_distinct('a', 0)` crashes with this traceback. What's going on and how do I fix it?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 19, in <module>\n longest_k_distinct('a', 0)\n ~~~~~~~~~~~~~~~~~~^^^^^^^^\n File \"solution.py\... | {
"kind": "code.debug.cmp_flip.longest_window",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 9,
"entry": "longest_k_distinct",
"checked_by": "buggy code fails on [\"a\", 0]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_i... |
codedebug-train-000313 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `word_break('a', [])` returns `True` instead of `False`. Find and fix the bug.\n\nTask: Return True if `s` can be split into a sequence of one or more words from `words` (each word can be used any number of times), and False otherwi... | {
"kind": "code.debug.index_swap.word_break",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 6,
"entry": "word_break",
"checked_by": "buggy code fails on [\"a\", []]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id": "b1a741a93... |
codedebug-train-000314 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: Given distinct positive coin values (unlimited supply of each) and an amount, return the fewest coins that add up to exactly the amount, or -1 if it cannot be made. An... | {
"kind": "code.debug.arith_flip.coin_change",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 3,
"entry": "fewest_coins",
"checked_by": "buggy code fails on [[7], 3]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "9d7f7ca... |
codedebug-train-000315 | [
{
"role": "user",
"content": "Tässä ratkaisuni. Jokin on vialla, mutta en näe mikä. Löydätkö virheen?\n\nTehtävä: Jokainen kokous on `[start, end)`: se varaa huoneen hetkestä `start` hetkeen `end` asti, mutta ei hetkeä `end`. Palauta pienin määrä huoneita, jotta kaksi kokousta ei ole samaan aikaan samassa h... | {
"kind": "code.debug.cmp_flip.meeting_rooms",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 7,
"entry": "min_meeting_rooms",
"checked_by": "buggy code fails on [[[9, 10], [10, 11]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"pro... |
codedebug-train-000316 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `num_islands(['000'])` returns `1` instead of `0`. Find and fix the bug.\n\nTask: The grid is a list of equal-length strings of '1' (land) and '0' (water). Two land cells belong to the same island when they are next to each other ho... | {
"kind": "code.debug.init_change.count_islands",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 7,
"entry": "num_islands",
"checked_by": "buggy code fails on [[\"000\"]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "f54b... |
codedebug-train-000317 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: Return the smallest number of words from `words` that concatenate to exactly `s` (each word can be used any number of times), or -1 if it is impossible. The empty stri... | {
"kind": "code.debug.cmp_flip.word_break",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 13,
"entry": "fewest_words",
"checked_by": "buggy code fails on [\"a\", []]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id": "80e4a7... |
codedebug-train-000318 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: Packages with weights `weights` must be shipped in the given order within `days` days (1 <= days <= len(weights)). Each day the ship takes a run of consecutive package... | {
"kind": "code.debug.drop_stmt.search_answer",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 12,
"entry": "min_ship_capacity",
"checked_by": "buggy code fails on [[5, 4], 1]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id"... |
codedebug-train-000319 | [
{
"role": "user",
"content": "Running `spiral_order([[1]])` crashes with this traceback. What's going on and how do I fix it?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 17, in <module>\n spiral_order([[1]])\n ~~~~~~~~~~~~^^^^^^^\n File \"solution.py\", line 8, in spiral_... | {
"kind": "code.debug.arith_flip.spiral",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 5,
"entry": "spiral_order",
"checked_by": "buggy code fails on [[[1]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "38f2502ba7... |
codedebug-train-000320 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `schedule(2, [])` should be `[0, 1]`, I get `[]`. What's wrong?\n\nTask: There are `n` tasks `0..n-1` and pairs `[a, b]` meaning task `a` must be done before task `b`. Return the lexicographically smallest order that does every task once and ... | {
"kind": "code.debug.cmp_flip.topo_order",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 20,
"entry": "schedule",
"checked_by": "buggy code fails on [2, []]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "723aad79cf87",
... |
codedebug-train-000321 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `fewest_words('cc', ['c'])` palauttaa `-1` eikä `2`. Etsi ja korjaa virhe.\n\nTehtävä: Palauta pienin määrä listan `words` sanoja, jotka peräkkäin muodostavat täsmälleen jonon `s` (jokaista sanaa saa käyttää kuinka monesti tahan... | {
"kind": "code.debug.arith_flip.word_break",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 9,
"entry": "fewest_words",
"checked_by": "buggy code fails on [\"cc\", [\"c\"]]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id": "8... |
codedebug-train-000322 | [
{
"role": "user",
"content": "Running `spiral_order([[1], [2], [3]])` crashes with this traceback. What's going on and how do I fix it?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 17, in <module>\n spiral_order([[1], [2], [3]])\n ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n File \"sol... | {
"kind": "code.debug.arith_flip.spiral",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 13,
"entry": "spiral_order",
"checked_by": "buggy code fails on [[[1], [2], [3]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": ... |
codedebug-train-000323 | [
{
"role": "user",
"content": "Here is my solution. Something is wrong but I can't see it. Can you find the bug?\n\nTask: Return how many non-empty contiguous subarrays of `nums` there are whose sum is exactly `k`. Values can be negative and the list can have hundreds of thousands of elements.\n\n```python\n... | {
"kind": "code.debug.index_swap.subarray_count",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 6,
"entry": "count_sum_k",
"checked_by": "buggy code fails on [[3], 3]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "30cbc... |
codedebug-train-000324 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `cheapest_price(2, [[0, 1, 37], [0, 1, 1], [0, 1, 5], [1, 0, 1], [1, 0, 10], [1, 0, 50]], 0, 0, 3)` palauttaa `55` eikä `0`. Etsi ja korjaa virhe.\n\nTehtävä: Kaupunkeja on `n` (`0..n-1`) ja yhdensuuntaisia lentoja `[u, v, price... | {
"kind": "code.debug.arith_flip.cheapest_path",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "cheapest_price",
"checked_by": "buggy code fails on [2, [[0, 1, 37], [0, 1, 1], [0, 1, 5], [1, 0, 1], [1, 0, 10]...; fix == verified reference (o... |
codedebug-train-000325 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `min_insertions(')(')` should be `2`, I get `0`. What's wrong?\n\nTask: `s` contains only `(` and `)`. Return the minimum number of parentheses you must insert (anywhere) to make it balanced.\n\n```python\ndef min_insertions(s: str) -> int:\n... | {
"kind": "code.debug.cmp_flip.brackets",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 4,
"entry": "min_insertions",
"checked_by": "buggy code fails on [\")(\"]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "f26917dfccd0... |
codedebug-train-000326 | [
{
"role": "user",
"content": "Tässä ratkaisuni. Jokin on vialla, mutta en näe mikä. Löydätkö virheen?\n\nTehtävä: Palauta, montako sellaista listan `nums` epätyhjää yhtenäistä osataulukkoa on, joiden summa on jaollinen luvulla `k` (`k >= 1`). Arvot voivat olla negatiivisia, ja listassa voi olla satoja tuhan... | {
"kind": "code.debug.drop_stmt.subarray_count",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 7,
"entry": "count_divisible",
"checked_by": "buggy code fails on [[3], 3]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "d4... |
codedebug-train-000327 | [
{
"role": "user",
"content": "Kun ajan `min_cost_path(6, [], 3, 3, 2)`, ohjelma kaatuu tällä virheilmoituksella. Mistä on kyse ja miten korjaan sen?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 22, in <module>\n min_cost_path(6, [], 3, 3, 2)\n ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^\... | {
"kind": "code.debug.drop_stmt.cheapest_path",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 11,
"entry": "min_cost_path",
"checked_by": "buggy code fails on [6, [], 3, 3, 2]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem... |
codedebug-train-000328 | [
{
"role": "user",
"content": "Kun ajan `longest_increasing([4])`, ohjelma kaatuu tällä virheilmoituksella. Mistä on kyse ja miten korjaan sen?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 15, in <module>\n longest_increasing([4])\n ~~~~~~~~~~~~~~~~~~^^^^^\n File \"solution... | {
"kind": "code.debug.bisect_swap.lis",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 7,
"entry": "longest_increasing",
"checked_by": "buggy code fails on [[4]]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "a9b07ae3... |
codedebug-train-000329 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `longest_palindromic_substring('b')` returns `0` instead of `1`. Find and fix the bug.\n\nTask: Return the length of the longest substring of `s` that reads the same backwards. `s` can be several thousand characters long, so checkin... | {
"kind": "code.debug.arith_flip.palindromes",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 4,
"entry": "longest_palindromic_substring",
"checked_by": "buggy code fails on [\"b\"]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem... |
codedebug-train-000330 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `knapsack([], [], 10)` raises `IndexError: list index out of range` instead of returning `0`. Find and fix the bug.\n\nTask: Item i weighs `weights[i]` and is worth `values[i]` (all positive integers). Return the largest total value... | {
"kind": "code.debug.arith_flip.knapsack",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 2,
"entry": "knapsack",
"checked_by": "buggy code fails on [[], [], 10]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "bbd681649271... |
codedebug-train-000331 | [
{
"role": "user",
"content": "Tässä ratkaisuni. Jokin on vialla, mutta en näe mikä. Löydätkö virheen?\n\nTehtävä: `prices[i]` on osakkeen hinta päivänä `i`. Saat tehdä kauppoja niin monta kuin haluat, mutta voit omistaa enintään yhden osakkeen kerrallaan, ja jokainen myynti maksaa `fee`. Palauta suurin mahd... | {
"kind": "code.debug.arith_flip.stock_profit",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 4,
"entry": "max_profit_with_fee",
"checked_by": "buggy code fails on [[12, 7], 3]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_i... |
codedebug-train-000332 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `obj = SlidingWindowLimiter(2, 1); obj.allow(5); obj.allow(5); obj.allow(5)` should be `False`, I get `True`. What's wrong?\n\nTask: Implement `SlidingWindowLimiter(limit, window)` with `allow(t)`. A call at time `t` is allowed if fewer than ... | {
"kind": "code.debug.cmp_flip.rate_limiter",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 12,
"entry": "SlidingWindowLimiter",
"checked_by": "buggy code fails on {\"init\": [2, 1], \"ops\": [[\"allow\", 5], [\"allow\", 5], [\"allow...; fix == verified... |
codedebug-train-000333 | [
{
"role": "user",
"content": "Here is my solution. Something is wrong but I can't see it. Can you find the bug?\n\nTask: Turn string `a` into string `b`. Inserting a character costs 1, deleting one costs 1, and replacing one character with a different one costs 1. Return the minimum total cost.\n\n```python... | {
"kind": "code.debug.arith_flip.edit_distance",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 7,
"entry": "transform_cost",
"checked_by": "buggy code fails on [\"acdb\", \"bcd\"]...; fix == verified reference (oracle-checked on 18 inputs)",
"proble... |
codedebug-train-000334 | [
{
"role": "user",
"content": "Saan poikkeuksen kutsulla `max_path_sum([[-2, -3]])`:\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 18, in <module>\n max_path_sum([[-2, -3]])\n ~~~~~~~~~~~~^^^^^^^^^^^^\n File \"solution.py\", line 9, in max_path_sum\n prev = best[r][c + 1]... | {
"kind": "code.debug.arith_flip.grid_paths",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 9,
"entry": "max_path_sum",
"checked_by": "buggy code fails on [[[-2, -3]]]...; fix == verified reference (oracle-checked on 17 inputs)",
"problem_id": "8... |
codedebug-train-000335 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `count_paths(['.....', '.....'])` should be `5`, I get `1`. What's wrong?\n\nTask: The grid is a list of strings of '.' (open) and '#' (blocked). Starting at the top-left cell and moving only right or down, how many paths reach the bottom-rig... | {
"kind": "code.debug.index_swap.grid_paths",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "count_paths",
"checked_by": "buggy code fails on [[\".....\", \".....\"]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_i... |
codedebug-train-000336 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `eval_expression('2 - 3 - 4')` should be `-5`, I get `2`. What's wrong?\n\nTask: The string contains non-negative integers, `+`, `-`, `*`, `/`, parentheses, spaces, and unary minus (as in `-3` or `-(2 + 1)`). Evaluate it with the usual preced... | {
"kind": "code.debug.bool_flip.expr_eval",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 40,
"entry": "eval_expression",
"checked_by": "buggy code fails on [\"2 - 3 - 4\"]...; fix == verified reference (oracle-checked on 22 inputs)",
"problem_id": "b... |
codedebug-train-000337 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `obj = WordIndex(); obj.insert('ab'); obj.count('cac'); obj.count('')` should be `0`, I get `1`. What's wrong?\n\nTask: Implement `WordIndex()` with three methods: `insert(word)` adds a word (duplicates count again), `count(word)` returns how... | {
"kind": "code.debug.drop_stmt.prefix_counter",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 9,
"entry": "WordIndex",
"checked_by": "buggy code fails on {\"init\": [], \"ops\": [[\"insert\", \"ab\"], [\"count\", \"cac\"], [\"c...; fix == verified refe... |
codedebug-train-000338 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `merge_intervals([[1, 3], [3, 5]])` should be `[[1, 5]]`, I get `[[3, 5]]`. What's wrong?\n\nTask: You are given a list of intervals `[start, end]` with `start < end`, in no particular order. Merge every group of intervals that overlap or tou... | {
"kind": "code.debug.index_swap.merge_intervals",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "merge_intervals",
"checked_by": "buggy code fails on [[[1, 3], [3, 5]]]...; fix == verified reference (oracle-checked on 19 inputs)",
"proble... |
codedebug-train-000339 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: There are piles of items `piles`. At speed `k` you take up to `k` items from one pile per hour (a pile with fewer items still takes the whole hour). Return the smalles... | {
"kind": "code.debug.arith_flip.search_answer",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 7,
"entry": "min_eating_speed",
"checked_by": "buggy code fails on [[9], 5]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "a... |
codedebug-train-000340 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `largest_square([])` pitäisi olla `0`, saan `1`. Mikä on vialla?\n\nTehtävä: `heights[i]` on histogrammin pylvään `i` korkeus; jokainen pylväs on 1 leveä, ja pylväät ovat vierekkäin. Palauta suurimman pylväiden sisään mahtuvan akselien suunta... | {
"kind": "code.debug.init_change.histogram",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 3,
"entry": "largest_square",
"checked_by": "buggy code fails on [[]]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "d87fffcb5cc7... |
codedebug-train-000341 | [
{
"role": "user",
"content": "My solution crashes: `spiral([[9]])` should return `[9]`, but it raises `IndexError: list index out of range`. What is wrong?\n\nTask: Return all elements of the `rows × cols` matrix in spiral order, starting at the top-left corner and going clockwise (right along the top row f... | {
"kind": "code.debug.arith_flip.spiral",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "spiral",
"checked_by": "buggy code fails on [[[9]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "38f2502ba7af",
"pro... |
codedebug-train-000342 | [
{
"role": "user",
"content": "I get an exception for `merge_intervals([[0, 1], [5, 8]])`:\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 12, in <module>\n merge_intervals([[0, 1], [5, 8]])\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^\n File \"solution.py\", line 5, in merge_intervals... | {
"kind": "code.debug.bool_flip.merge_intervals",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 5,
"entry": "merge_intervals",
"checked_by": "buggy code fails on [[[0, 1], [5, 8]]]...; fix == verified reference (oracle-checked on 19 inputs)",
"pr... |
codedebug-train-000343 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `longest_unique_run('aaaa')` palauttaa `7` eikä `1`. Etsi ja korjaa virhe.\n\nTehtävä: Palauta merkkijonon `s` pisimmän sellaisen osajonon pituus, jossa mikään merkki ei esiinny kahdesti. `s` voi olla satojatuhansia merkkejä pit... | {
"kind": "code.debug.arith_flip.longest_window",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "longest_unique_run",
"checked_by": "buggy code fails on [\"aaaa\"]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id":... |
codedebug-train-000344 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `max_path_sum([[1], [1]])` returns `1` instead of `2`. Find and fix the bug.\n\nTask: The grid holds integers (possibly negative). Starting at the top-left cell and moving only right or down to the bottom-right cell, return the larg... | {
"kind": "code.debug.bool_flip.grid_paths",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 6,
"entry": "max_path_sum",
"checked_by": "buggy code fails on [[[1], [1]]]...; fix == verified reference (oracle-checked on 17 inputs)",
"problem_id": "88866de... |
codedebug-train-000345 | [
{
"role": "user",
"content": "Tässä ratkaisuni. Jokin on vialla, mutta en näe mikä. Löydätkö virheen?\n\nTehtävä: Saat listan välejä `[start, end]`, joissa `start < end`, satunnaisessa järjestyksessä. Yhdistä jokainen joukko välejä, jotka menevät päällekkäin enemmän kuin yhden pisteen verran ([1, 3] ja [3, ... | {
"kind": "code.debug.minmax_swap.merge_intervals",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 6,
"entry": "merge",
"checked_by": "buggy code fails on [[[1, 4], [1, 2], [1, 3]]]...; fix == verified reference (oracle-checked on 19 inputs)",
"probl... |
codedebug-train-000346 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `count_big_inversions([5, 1, -3])` should be `3`, I get `1`. What's wrong?\n\nTask: Return the number of index pairs `i < j` with `a[i] > 2 * a[j]`. Values can be negative and the list can have 150,000 elements, so checking every pair is too ... | {
"kind": "code.debug.arith_flip.inversions",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "count_big_inversions",
"checked_by": "buggy code fails on [[5, 1, -3]]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id":... |
codedebug-train-000347 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `best_path([[-6], [-2], [-2], [0]])` palauttaa `0` eikä `-10`. Etsi ja korjaa virhe.\n\nTehtävä: Ruudukossa on kokonaislukuja (myös negatiivisia). Palauta suurin mahdollinen polun arvojen summa, kun liikutaan vasemmasta yläkulma... | {
"kind": "code.debug.cmp_flip.grid_paths",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 10,
"entry": "best_path",
"checked_by": "buggy code fails on [[[-6], [-2], [-2], [0]]]...; fix == verified reference (oracle-checked on 17 inputs)",
"problem_id"... |
codedebug-train-000348 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `fix_parens('(')` should be `1`, I get `-1`. What's wrong?\n\nTask: `s` contains only `(` and `)`. Return the minimum number of parentheses you must insert (anywhere) to make it balanced.\n\n```python\ndef fix_parens(s: str) -> int:\n open... | {
"kind": "code.debug.arith_flip.brackets",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 10,
"entry": "fix_parens",
"checked_by": "buggy code fails on [\"(\"]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "f26917dfccd0",... |
codedebug-train-000349 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `window_minima([3, 8, 5, 9], 2)` returns `[3, 3, 3]` instead of `[3, 5, 5]`. Find and fix the bug.\n\nTask: Given a list `nums` and a window size `k` (1 <= k <= len(nums)), return the smallest value in every window of `k` consecutiv... | {
"kind": "code.debug.index_swap.window_extreme",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 10,
"entry": "window_minima",
"checked_by": "buggy code fails on [[3, 8, 5, 9], 2]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_i... |
codedebug-train-000350 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `best_single_trade([1, 2])` returns `0` instead of `1`. Find and fix the bug.\n\nTask: `prices[i]` is the price of a share on day `i`. You may buy once and sell once later (or not trade at all). Return the maximum profit. There can ... | {
"kind": "code.debug.minmax_swap.stock_profit",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 4,
"entry": "best_single_trade",
"checked_by": "buggy code fails on [[1, 2]]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "04... |
codedebug-train-000351 | [
{
"role": "user",
"content": "Tarkista tämä ratkaisu: siinä on virhe jossain. Etsi se, näytä syöte, joka epäonnistuu, ja korjaa se.\n\nTehtävä: Annettu lista `nums` ja ikkunan koko `k` (1 <= k <= len(nums)). Palauta jokaisen `k` peräkkäisen alkion ikkunan suurin arvo vasemmalta oikealle. Listassa voi olla s... | {
"kind": "code.debug.cmp_flip.window_extreme",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 9,
"entry": "sliding_max",
"checked_by": "buggy code fails on [[8], 1]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "c24ff94... |
codedebug-train-000352 | [
{
"role": "user",
"content": "My solution crashes: `word_break('aaaa', ['a', 'aa'])` should return `True`, but it raises `NameError: name 'w' is not defined`. What is wrong?\n\nTask: Return True if `s` can be split into a sequence of one or more words from `words` (each word can be used any number of times)... | {
"kind": "code.debug.drop_stmt.word_break",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 9,
"entry": "word_break",
"checked_by": "buggy code fails on [\"aaaa\", [\"a\", \"aa\"]]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_... |
codedebug-train-000353 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `longest_distinct_substring('')` should be `0`, I get `1`. What's wrong?\n\nTask: Return the length of the longest substring of `s` in which no character appears twice. `s` can be hundreds of thousands of characters long.\n\n```python\ndef lo... | {
"kind": "code.debug.init_change.longest_window",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 3,
"entry": "longest_distinct_substring",
"checked_by": "buggy code fails on [\"\"]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem... |
codedebug-train-000354 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `spiral([[1]])` palauttaa `[1, 1, 1]` eikä `[1]`. Etsi ja korjaa virhe.\n\nTehtävä: Palauta `rows × cols` -matriisin kaikki alkiot spiraalijärjestyksessä alkaen vasemmasta yläkulmasta ja kulkien myötäpäivään (ensin oikealle ylin... | {
"kind": "code.debug.arith_flip.spiral",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "spiral",
"checked_by": "buggy code fails on [[[1]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "38f2502ba7af",
"pro... |
codedebug-train-000355 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `max_profit_once([1, 2])` pitäisi olla `1`, saan `0`. Mikä on vialla?\n\nTehtävä: `prices[i]` on osakkeen hinta päivänä `i`. Saat ostaa kerran ja myydä kerran myöhemmin (tai olla käymättä kauppaa). Palauta suurin mahdollinen voitto. Päiviä vo... | {
"kind": "code.debug.drop_stmt.stock_profit",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 4,
"entry": "max_profit_once",
"checked_by": "buggy code fails on [[1, 2]]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "0405ef... |
codedebug-train-000356 | [
{
"role": "user",
"content": "Kun ajan `evaluate('8')`, ohjelma kaatuu tällä virheilmoituksella. Mistä on kyse ja miten korjaan sen?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 56, in <module>\n evaluate('8')\n ~~~~~~~~^^^^^\n File \"solution.py\", line 7, in evaluate\n ... | {
"kind": "code.debug.bool_flip.expr_eval",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 7,
"entry": "evaluate",
"checked_by": "buggy code fails on [\"8\"]...; fix == verified reference (oracle-checked on 22 inputs)",
"problem_id": "2918dd17ef27... |
codedebug-train-000357 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `min_ship_capacity([4, 9, 6], 1)` returns `9` instead of `19`. Find and fix the bug.\n\nTask: Packages with weights `weights` must be shipped in the given order within `days` days (1 <= days <= len(weights)). Each day the ship takes... | {
"kind": "code.debug.arith_flip.search_answer",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 6,
"entry": "min_ship_capacity",
"checked_by": "buggy code fails on [[4, 9, 6], 1]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id... |
codedebug-train-000358 | [
{
"role": "user",
"content": "Here is my solution. Something is wrong but I can't see it. Can you find the bug?\n\nTask: Return how many non-empty contiguous subarrays of `nums` there are whose sum is exactly `k`. Values can be negative and the list can have hundreds of thousands of elements.\n\n```python\n... | {
"kind": "code.debug.init_change.subarray_count",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 6,
"entry": "subarrays_with_sum",
"checked_by": "buggy code fails on [[3], 3]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id"... |
codedebug-train-000359 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `longest_palindromic_substring('b')` should be `1`, I get `0`. What's wrong?\n\nTask: Return the length of the longest substring of `s` that reads the same backwards. `s` can be several thousand characters long, so checking every substring se... | {
"kind": "code.debug.drop_stmt.palindromes",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 6,
"entry": "longest_palindromic_substring",
"checked_by": "buggy code fails on [\"b\"]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_... |
codedebug-train-000360 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `largest_rectangle([5])` returns `0` instead of `5`. Find and fix the bug.\n\nTask: `heights[i]` is the height of bar `i` in a histogram; every bar is 1 wide and bars stand side by side. Return the area of the largest axis-aligned r... | {
"kind": "code.debug.drop_stmt.histogram",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 9,
"entry": "largest_rectangle",
"checked_by": "buggy code fails on [[5]]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "b594cfa644... |
codedebug-train-000361 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `count_paths(['.'])` pitäisi olla `1`, saan `2`. Mikä on vialla?\n\nTehtävä: Ruudukko on lista merkkijonoja, joissa '.' on vapaa ja '#' estetty. Kuinka monta polkua vie vasemmasta yläkulmasta oikeaan alakulmaan, kun saa liikkua vain oikealle ... | {
"kind": "code.debug.cmp_flip.grid_paths",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 10,
"entry": "count_paths",
"checked_by": "buggy code fails on [[\".\"]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "9cbaa94810d... |
codedebug-train-000362 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `number_of_groups(5, [[0, 1]])` should be `4`, I get `5`. What's wrong?\n\nTask: There are `n` nodes numbered 0..n-1 and a list of undirected edges `[u, v]`. Return the number of connected groups. `n` and the number of edges can both be 200,0... | {
"kind": "code.debug.cmp_flip.union_find",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 14,
"entry": "number_of_groups",
"checked_by": "buggy code fails on [5, [[0, 1]]]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id": "fe... |
codedebug-train-000363 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: Implement `PrefixCounter()` with three methods: `insert(word)` adds a word (duplicates count again), `count(word)` returns how many times exactly `word` was inserted, ... | {
"kind": "code.debug.arith_flip.prefix_counter",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 10,
"entry": "PrefixCounter",
"checked_by": "buggy code fails on {\"init\": [], \"ops\": [[\"insert\", \"abc\"], [\"starts_with\", \"abc...; fix == verifie... |
codedebug-train-000364 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `merge([[1, 3], [3, 5]])` nostaa poikkeuksen `IndexError: list index out of range` eikä palauta `[[1, 3], [3, 5]]`. Etsi ja korjaa virhe.\n\nTehtävä: Saat listan välejä `[start, end]`, joissa `start < end`, satunnaisessa järjest... | {
"kind": "code.debug.bool_flip.merge_intervals",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "merge",
"checked_by": "buggy code fails on [[[1, 3], [3, 5]]]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "e48... |
codedebug-train-000365 | [
{
"role": "user",
"content": "Here is my solution. Something is wrong but I can't see it. Can you find the bug?\n\nTask: Implement `SlidingWindowLimiter(limit, window)` with `allow(t)`. A call at time `t` is allowed if fewer than `limit` allowed calls happened in the window `(t - window, t]`; allowed calls ... | {
"kind": "code.debug.cmp_flip.rate_limiter",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 12,
"entry": "SlidingWindowLimiter",
"checked_by": "buggy code fails on {\"init\": [2, 1], \"ops\": [[\"allow\", 5], [\"allow\", 5], [\"allow...; fix == verifi... |
codedebug-train-000366 | [
{
"role": "user",
"content": "Saan poikkeuksen kutsulla `lcs_length('', '')`:\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 11, in <module>\n lcs_length('', '')\n ~~~~~~~~~~^^^^^^^^\n File \"solution.py\", line 8, in lcs_length\n return prev[-1]\n ~~~~^^^^\nInd... | {
"kind": "code.debug.arith_flip.common_sequence",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 2,
"entry": "lcs_length",
"checked_by": "buggy code fails on [\"\", \"\"]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id":... |
codedebug-train-000367 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `max_path_sum([[5]])` should be `5`, I get `-5`. What's wrong?\n\nTask: The grid holds integers (possibly negative). Starting at the top-left cell and moving only right or down to the bottom-right cell, return the largest possible sum of the ... | {
"kind": "code.debug.arith_flip.grid_paths",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 14,
"entry": "max_path_sum",
"checked_by": "buggy code fails on [[[5]]]...; fix == verified reference (oracle-checked on 17 inputs)",
"problem_id": "88866def76... |
codedebug-train-000368 | [
{
"role": "user",
"content": "Kun ajan `islands(['01'])`, ohjelma kaatuu tällä virheilmoituksella. Mistä on kyse ja miten korjaan sen?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 24, in <module>\n islands(['01'])\n ~~~~~~~^^^^^^^^\n File \"solution.py\", line 17, in islan... | {
"kind": "code.debug.drop_stmt.count_islands",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 16,
"entry": "islands",
"checked_by": "buggy code fails on [[\"01\"]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "49595... |
codedebug-train-000369 | [
{
"role": "user",
"content": "I get an exception for `max_histogram_area([])`:\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 14, in <module>\n max_histogram_area([])\n ~~~~~~~~~~~~~~~~~~^^^^\n File \"solution.py\", line 4, in max_histogram_area\n for i, h in enumerate(he... | {
"kind": "code.debug.arith_flip.histogram",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 4,
"entry": "max_histogram_area",
"checked_by": "buggy code fails on [[]]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "b594... |
codedebug-train-000370 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: The string contains non-negative integers, `+`, `-`, `*`, `/`, parentheses, spaces, and unary minus (as in `-3` or `-(2 + 1)`). Evaluate it with the usual precedence (... | {
"kind": "code.debug.cmp_flip.expr_eval",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 39,
"entry": "calc",
"checked_by": "buggy code fails on [\"10 / 9\"]...; fix == verified reference (oracle-checked on 22 inputs)",
"problem_id": "2918dd17ef27",... |
codedebug-train-000371 | [
{
"role": "user",
"content": "I get an exception for `sliding_max([5], 1)`:\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 18, in <module>\n sliding_max([5], 1)\n ~~~~~~~~~~~^^^^^^^^\n File \"solution.py\", line 14, in sliding_max\n out.append(nums[window[0]])\n ... | {
"kind": "code.debug.arith_flip.window_extreme",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 11,
"entry": "sliding_max",
"checked_by": "buggy code fails on [[5], 1]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "1... |
codedebug-train-000372 | [
{
"role": "user",
"content": "Kun ajan `compress('')`, ohjelma kaatuu tällä virheilmoituksella. Mistä on kyse ja miten korjaan sen?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 13, in <module>\n compress('')\n ~~~~~~~~^^^^\n File \"solution.py\", line 8, in compress\n o... | {
"kind": "code.debug.cmp_flip.rle",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 3,
"entry": "compress",
"checked_by": "buggy code fails on [\"\"]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "29749195abb7",
"pr... |
codedebug-train-000373 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `count_paths(['.....#', '#.....'])` pitäisi olla `4`, saan `0`. Mikä on vialla?\n\nTehtävä: Ruudukko on lista merkkijonoja, joissa '.' on vapaa ja '#' estetty. Kuinka monta polkua vie vasemmasta yläkulmasta oikeaan alakulmaan, kun saa liikkua... | {
"kind": "code.debug.index_swap.grid_paths",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "count_paths",
"checked_by": "buggy code fails on [[\".....#\", \"#.....\"]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem... |
codedebug-train-000374 | [
{
"role": "user",
"content": "Here is my solution. Something is wrong but I can't see it. Can you find the bug?\n\nTask: Return how many non-empty contiguous subarrays of `nums` there are whose sum is divisible by `k` (`k >= 1`). Values can be negative and the list can have hundreds of thousands of elements... | {
"kind": "code.debug.drop_stmt.subarray_count",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 6,
"entry": "count_divisible",
"checked_by": "buggy code fails on [[-4, -4, -4], 5]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem... |
codedebug-train-000375 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `common_substring_len('', '')` returns `1` instead of `0`. Find and fix the bug.\n\nTask: Return the length of the longest string that appears as a contiguous substring in both `a` and `b`. Both strings can be over a thousand charac... | {
"kind": "code.debug.init_change.common_sequence",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 2,
"entry": "common_substring_len",
"checked_by": "buggy code fails on [\"\", \"\"]...; fix == verified reference (oracle-checked on 20 inputs)",
"proble... |
codedebug-train-000376 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `max_value([5], [10], 5)` pitäisi olla `10`, saan `0`. Mikä on vialla?\n\nTehtävä: Esine i painaa `weights[i]` ja on arvoltaan `values[i]` (kaikki positiivisia kokonaislukuja). Palauta suurin kokonaisarvo, jonka kokonaispaino on enintään `cap... | {
"kind": "code.debug.arith_flip.knapsack",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 4,
"entry": "max_value",
"checked_by": "buggy code fails on [[5], [10], 5]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "ad345a84d... |
codedebug-train-000377 | [
{
"role": "user",
"content": "Tarkista tämä ratkaisu: siinä on virhe jossain. Etsi se, näytä syöte, joka epäonnistuu, ja korjaa se.\n\nTehtävä: Ruudukossa on kokonaislukuja (myös negatiivisia). Palauta suurin mahdollinen polun arvojen summa, kun liikutaan vasemmasta yläkulmasta oikeaan alakulmaan vain oikea... | {
"kind": "code.debug.minmax_swap.grid_paths",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 13,
"entry": "best_path",
"checked_by": "buggy code fails on [[[-1, -2], [-3, -4]]]...; fix == verified reference (oracle-checked on 17 inputs)",
"problem_i... |
codedebug-train-000378 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: You are given a list of intervals `[start, end]` with `start < end`, in no particular order. Merge every group of intervals that overlap or touch (sharing only an endp... | {
"kind": "code.debug.index_swap.merge_intervals",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 4,
"entry": "merge",
"checked_by": "buggy code fails on [[[1, 10], [2, 3], [4, 5]]]...; fix == verified reference (oracle-checked on 19 inputs)",
"probl... |
codedebug-train-000379 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `subarrays_with_sum([3], 3)` pitäisi olla `1`, saan `0`. Mikä on vialla?\n\nTehtävä: Palauta, montako sellaista listan `nums` epätyhjää yhtenäistä osataulukkoa on, joiden summa on tasan `k`. Arvot voivat olla negatiivisia, ja listassa voi oll... | {
"kind": "code.debug.arith_flip.subarray_count",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 10,
"entry": "subarrays_with_sum",
"checked_by": "buggy code fails on [[3], 3]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": ... |
codedebug-train-000380 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `subarrays_div_by([3], 3)` should be `1`, I get `0`. What's wrong?\n\nTask: Return how many non-empty contiguous subarrays of `nums` there are whose sum is divisible by `k` (`k >= 1`). Values can be negative and the list can have hundreds of ... | {
"kind": "code.debug.drop_stmt.subarray_count",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 7,
"entry": "subarrays_div_by",
"checked_by": "buggy code fails on [[3], 3]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "d4e... |
codedebug-train-000381 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `best_path([[-3, 3]])` should be `0`, I get `3`. What's wrong?\n\nTask: The grid holds integers (possibly negative). Starting at the top-left cell and moving only right or down to the bottom-right cell, return the largest possible sum of the ... | {
"kind": "code.debug.cmp_flip.grid_paths",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "best_path",
"checked_by": "buggy code fails on [[[-3, 3]]]...; fix == verified reference (oracle-checked on 17 inputs)",
"problem_id": "88866def76ad... |
codedebug-train-000382 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `cheapest_price(3, [[0, 1, 5]], 0, 2, 1)` pitäisi olla `-1`, saan `inf`. Mikä on vialla?\n\nTehtävä: Kaupunkeja on `n` (`0..n-1`) ja yhdensuuntaisia lentoja `[u, v, price]`. Palauta halvin kokonaishinta kaupungista `src` kaupunkiin `dst`, kun... | {
"kind": "code.debug.cmp_flip.cheapest_path",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 11,
"entry": "cheapest_price",
"checked_by": "buggy code fails on [3, [[0, 1, 5]], 0, 2, 1]...; fix == verified reference (oracle-checked on 19 inputs)",
"pro... |
codedebug-train-000383 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `min_meeting_rooms([[1, 4], [7, 15]])` pitäisi olla `1`, saan `2`. Mikä on vialla?\n\nTehtävä: Jokainen kokous on `[start, end)`: se varaa huoneen hetkestä `start` hetkeen `end` asti, mutta ei hetkeä `end`. Palauta pienin määrä huoneita, jott... | {
"kind": "code.debug.drop_stmt.meeting_rooms",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "min_meeting_rooms",
"checked_by": "buggy code fails on [[[1, 4], [7, 15]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"proble... |
codedebug-train-000384 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `knapsack([1], [32], 2)` should be `64`, I get `0`. What's wrong?\n\nTask: Item i weighs `weights[i]` and is worth `values[i]` (all positive integers). Return the largest total value whose total weight is at most `capacity`; each item can be ... | {
"kind": "code.debug.arith_flip.knapsack",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 5,
"entry": "knapsack",
"checked_by": "buggy code fails on [[1], [32], 2]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "bbd6816492... |
codedebug-train-000385 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `obj = RangeSum([1, -8, -4, 1, -6, -8, 0]); obj.query(2, 6)` returns `-11` instead of `-17`. Find and fix the bug.\n\nTask: Implement `RangeSum(nums)` with `update(index, value)`, which sets `nums[index] = value`, and `query(left, r... | {
"kind": "code.debug.neg_drop.range_sum",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 12,
"entry": "RangeSum",
"checked_by": "buggy code fails on {\"init\": [[1, -8, -4, 1, -6, -8, 0]], \"ops\": [[\"query\", 2, 6...; fix == verified reference (oracle... |
codedebug-train-000386 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: Given a list `nums` and a window size `k` (1 <= k <= len(nums)), return the largest value in every window of `k` consecutive elements, from left to right. The list can... | {
"kind": "code.debug.bool_flip.window_extreme",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 8,
"entry": "sliding_max",
"checked_by": "buggy code fails on [[5], 1]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "13c182... |
codedebug-train-000387 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `eval_expression('7 / -2')` pitäisi olla `-3`, saan `3`. Mikä on vialla?\n\nTehtävä: Merkkijonossa on ei-negatiivisia kokonaislukuja, `+`, `-`, `*`, `/`, sulkeita, välilyöntejä ja unaarinen miinus (kuten `-3` tai `-(2 + 1)`). Laske se tavalli... | {
"kind": "code.debug.cmp_flip.expr_eval",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 43,
"entry": "eval_expression",
"checked_by": "buggy code fails on [\"7 / -2\"]...; fix == verified reference (oracle-checked on 22 inputs)",
"problem_id": "2918d... |
codedebug-train-000388 | [
{
"role": "user",
"content": "Saan poikkeuksen kutsulla `knapsack([3], [33], 4)`:\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 10, in <module>\n knapsack([3], [33], 4)\n ~~~~~~~~^^^^^^^^^^^^^^\n File \"solution.py\", line 5, in knapsack\n if w <= c and best[c + w] + v >... | {
"kind": "code.debug.arith_flip.knapsack",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 5,
"entry": "knapsack",
"checked_by": "buggy code fails on [[3], [33], 4]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "bbd68... |
codedebug-train-000389 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: `s` contains only `(` and `)`. Return the minimum number of parentheses you must insert (anywhere) to make it balanced.\n\n```python\ndef fix_parens(s: str) -> int:\n ... | {
"kind": "code.debug.arith_flip.brackets",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 10,
"entry": "fix_parens",
"checked_by": "buggy code fails on [\"(\"]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "f26917dfccd0... |
codedebug-train-000390 | [
{
"role": "user",
"content": "Running `merge([[1, 3], [3, 5]])` crashes with this traceback. What's going on and how do I fix it?\n\n```\nTraceback (most recent call last):\n File \"solution.py\", line 12, in <module>\n merge([[1, 3], [3, 5]])\n ~~~~~^^^^^^^^^^^^^^^^^^\n File \"solution.py\", line 5... | {
"kind": "code.debug.bool_flip.merge_intervals",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "traceback",
"bug_line": 5,
"entry": "merge",
"checked_by": "buggy code fails on [[[1, 3], [3, 5]]]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id":... |
codedebug-train-000391 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `count_divisible([0, 0], 4)` pitäisi olla `3`, saan `2`. Mikä on vialla?\n\nTehtävä: Palauta, montako sellaista listan `nums` epätyhjää yhtenäistä osataulukkoa on, joiden summa on jaollinen luvulla `k` (`k >= 1`). Arvot voivat olla negatiivis... | {
"kind": "code.debug.drop_stmt.subarray_count",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 8,
"entry": "count_divisible",
"checked_by": "buggy code fails on [[0, 0], 4]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "d... |
codedebug-train-000392 | [
{
"role": "user",
"content": "Ratkaisuni antaa väärän vastauksen: `min_removals([[1, 2]])` pitäisi olla `0`, saan `2`. Mikä on vialla?\n\nTehtävä: Saat välit `[start, end]`, joissa `start < end`. Palauta pienin määrä välejä, jotka on poistettava, jotta loput eivät mene päällekkäin. Välit, jotka vain koskett... | {
"kind": "code.debug.arith_flip.interval_greedy",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 7,
"entry": "min_removals",
"checked_by": "buggy code fails on [[[1, 2]]]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id": "807... |
codedebug-train-000393 | [
{
"role": "user",
"content": "My solution crashes: `min_meeting_rooms([[2, 4]])` should return `1`, but it raises `IndexError: list index out of range`. What is wrong?\n\nTask: Each meeting is `[start, end)`: it occupies a room from `start` up to, but not including, `end`. Return the minimum number of rooms... | {
"kind": "code.debug.bool_flip.meeting_rooms",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 7,
"entry": "min_meeting_rooms",
"checked_by": "buggy code fails on [[[2, 4]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"problem_id": "a... |
codedebug-train-000394 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `word_break('cab', ['c', 'ab', 'cab'])` palauttaa `False` eikä `True`. Etsi ja korjaa virhe.\n\nTehtävä: Palauta True, jos `s` voidaan jakaa yhden tai useamman listan `words` sanan jonoksi (jokaista sanaa saa käyttää kuinka mone... | {
"kind": "code.debug.minmax_swap.word_break",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 3,
"entry": "word_break",
"checked_by": "buggy code fails on [\"cab\", [\"c\", \"ab\", \"cab\"]]...; fix == verified reference (oracle-checked on 20 inputs)",
... |
codedebug-train-000395 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `longest_unique_run('')` should be `0`, I get `1`. What's wrong?\n\nTask: Return the length of the longest substring of `s` in which no character appears twice. `s` can be hundreds of thousands of characters long.\n\n```python\ndef longest_un... | {
"kind": "code.debug.init_change.longest_window",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 3,
"entry": "longest_unique_run",
"checked_by": "buggy code fails on [\"\"]...; fix == verified reference (oracle-checked on 20 inputs)",
"problem_id": "d... |
codedebug-train-000396 | [
{
"role": "user",
"content": "Please review this solution: there is a bug somewhere. Find it, show an input that fails, and fix it.\n\nTask: `s` contains only `(` and `)`. Return the minimum number of parentheses you must insert (anywhere) to make it balanced.\n\n```python\ndef fix_parens(s: str) -> int:\n ... | {
"kind": "code.debug.cmp_flip.brackets",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "nohint",
"bug_line": 4,
"entry": "fix_parens",
"checked_by": "buggy code fails on [\")(\"]...; fix == verified reference (oracle-checked on 21 inputs)",
"problem_id": "f26917dfccd0",... |
codedebug-train-000397 | [
{
"role": "user",
"content": "My solution gives the wrong answer: `obj = RangeSum([5]); obj.query(0, 0)` should be `5`, I get `0`. What's wrong?\n\nTask: Implement `RangeSum(nums)` with `update(index, value)`, which sets `nums[index] = value`, and `query(left, right)`, which returns the sum of `nums[left..r... | {
"kind": "code.debug.arith_flip.range_sum",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 26,
"entry": "RangeSum",
"checked_by": "buggy code fails on {\"init\": [[5]], \"ops\": [[\"query\", 0, 0], [\"update\", 0, -3], ...; fix == verified reference (or... |
codedebug-train-000398 | [
{
"role": "user",
"content": "Tämän pitäisi ratkaista alla oleva tehtävä, mutta `spiral_order([[9, 9, 1, 5], [3, 7, 8, 0]])` palauttaa `[9, 3, 7, 8, 0, 1, 9]` eikä `[9, 3, 7, 8, 0, 5, 1, 9]`. Etsi ja korjaa virhe.\n\nTehtävä: Palauta `rows × cols` -matriisin kaikki alkiot spiraalijärjestyksessä alkaen vasem... | {
"kind": "code.debug.off_by_one.spiral",
"lang": "fi",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 10,
"entry": "spiral_order",
"checked_by": "buggy code fails on [[[9, 9, 1, 5], [3, 7, 8, 0]]]...; fix == verified reference (oracle-checked on 18 inputs)",
"probl... |
codedebug-train-000399 | [
{
"role": "user",
"content": "This is supposed to solve the task below, but `window_minima([2], 1)` returns `[]` instead of `[2]`. Find and fix the bug.\n\nTask: Given a list `nums` and a window size `k` (1 <= k <= len(nums)), return the smallest value in every window of `k` consecutive elements, from left ... | {
"kind": "code.debug.arith_flip.window_extreme",
"lang": "en",
"generator": "kreatix-code-debug",
"version": "0.1.0",
"mode": "fail",
"bug_line": 9,
"entry": "window_minima",
"checked_by": "buggy code fails on [[2], 1]...; fix == verified reference (oracle-checked on 19 inputs)",
"problem_id": "3d3c2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.