id stringlengths 21 21 | messages listlengths 2 4 | meta dict |
|---|---|---|
codeplan-train-000000 | [
{
"role": "user",
"content": "I'm building the in-memory layer of an API backend in Python, as one module `memlayer.py`. It needs these parts:\n\n1. **Versioned key-value store.** Implement `TimeMap()` with `set(key, value, timestamp)` and `get(key, timestamp)`. get returns the value set for `key` at the la... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"time_map",
"range_sum",
"window_extreme"
],
"entries": [
"TimeMap",
"PointUpdateSums",
"sliding_min"
],
"problem_ids": [
"a6e61ba9ba95",
"268... |
codeplan-train-000001 | [
{
"role": "user",
"content": "I need a route-planning module for a delivery map in Python: a single module, `routing.py`, with the following parts.\n\n1. **First edge that closes a cycle.** There are `n` nodes numbered 0..n-1 and a list of undirected edges `[u, v]`. Edges are added one by one in the given o... | {
"kind": "code.plan.routing",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"union_find",
"count_islands",
"grid_paths"
],
"entries": [
"first_cycle_edge",
"num_islands",
"best_path"
],
"problem_ids": [
"68a840458140",
... |
codeplan-train-000002 | [
{
"role": "user",
"content": "I need the core of a calculator service in Python: a single module, `calc_core.py`, with the following parts.\n\n1. **Count subarrays.** 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 hun... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"subarray_count",
"expr_eval"
],
"entries": [
"subarrays_with_sum",
"evaluate"
],
"problem_ids": [
"30cbcb348f5f",
"ba1b3f285f18"
],
"difficulty": 3... |
codeplan-train-000003 | [
{
"role": "user",
"content": "I need a scheduling toolkit for a booking app in Python: a single module, `scheduling.py`, with the following parts.\n\n1. **Merge overlapping intervals.** You are given a list of intervals `[start, end]` with `start < end`, in no particular order. Merge every group of interval... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"merge_intervals",
"topo_order",
"search_answer"
],
"entries": [
"merge",
"smallest_topo_order",
"slowest_speed"
],
"problem_ids": [
"7ce574f99... |
codeplan-train-000004 | [
{
"role": "user",
"content": "Project: a scheduling toolkit for a booking app. Everything goes in one Python module, `scheduling.py`. Parts:\n\n1. **Slowest speed that finishes in time.** 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 ... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"search_answer",
"interval_greedy",
"meeting_rooms"
],
"entries": [
"min_eating_speed",
"min_points_to_cover",
"rooms_needed"
],
"problem_ids": [
... |
codeplan-train-000005 | [
{
"role": "user",
"content": "I need a small text-processing library in Python: a single module, `textkit.py`, with the following parts.\n\n1. **Longest substring without repeats.** Return the length of the longest substring of `s` in which no character appears twice. `s` can be hundreds of thousands of cha... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"longest_window",
"palindromes",
"common_sequence"
],
"entries": [
"longest_unique_run",
"count_palindromes",
"common_substring_len"
],
"problem_ids": [
... |
codeplan-train-000006 | [
{
"role": "user",
"content": "I need a small text-processing library in Python: a single module, `textkit.py`, with the following parts.\n\n1. **Longest substring without repeats.** Return the length of the longest substring of `s` in which no character appears twice. `s` can be hundreds of thousands of cha... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"longest_window",
"edit_distance",
"word_break"
],
"entries": [
"longest_unique_run",
"weighted_edit_distance",
"word_break"
],
"problem_ids": [
"d08... |
codeplan-train-000007 | [
{
"role": "user",
"content": "Projekti: toimituskartan reitinsuunnittelumoduuli. Kaikki menee yhteen Python-moduuliin, `routing.py`. Osat:\n\n1. **Paras polku ruudukon läpi.** Ruudukossa on kokonaislukuja (myös negatiivisia). Palauta suurin mahdollinen polun arvojen summa, kun liikutaan vasemmasta yläkulmas... | {
"kind": "code.plan.routing",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"grid_paths",
"union_find"
],
"entries": [
"best_path",
"largest_group"
],
"problem_ids": [
"88866def76ad",
"2b655db75f55"
],
"difficulty": 2,
... |
codeplan-train-000008 | [
{
"role": "user",
"content": "Projekti: ajanvaraussovelluksen aikataulutyökalut. Kaikki menee yhteen Python-moduuliin, `scheduling.py`. Osat:\n\n1. **Tehtävien järjestys.** Tehtäviä on `n` (`0..n-1`) ja pareja `[a, b]`, jotka tarkoittavat, että tehtävä `a` on tehtävä ennen tehtävää `b`. Palauta leksikografi... | {
"kind": "code.plan.scheduling",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"topo_order",
"search_answer",
"interval_greedy"
],
"entries": [
"schedule",
"min_ship_capacity",
"min_removals"
],
"problem_ids": [
"723aad79c... |
codeplan-train-000009 | [
{
"role": "user",
"content": "Project: the core of a calculator service. Everything goes in one Python module, `calc_core.py`. Parts:\n\n1. **Fix the parentheses.** `s` contains only `(` and `)`. Return the minimum number of parentheses you must insert (anywhere) to make it balanced.\n2. **Count subarrays.*... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"brackets",
"subarray_count"
],
"entries": [
"fix_parens",
"subarrays_with_sum"
],
"problem_ids": [
"f26917dfccd0",
"30cbcb348f5f"
],
"difficulty": 2... |
codeplan-train-000010 | [
{
"role": "user",
"content": "I'm building a scheduling toolkit for a booking app in Python, as one module `scheduling.py`. It needs these parts:\n\n1. **Fewest points that cover every interval.** You are given intervals `[start, end]` with `start < end`. Return the smallest number of points such that every... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"interval_greedy",
"topo_order"
],
"entries": [
"fewest_stabs",
"smallest_topo_order"
],
"problem_ids": [
"cdf4939fe2d3",
"723aad79cf87"
],
"di... |
codeplan-train-000011 | [
{
"role": "user",
"content": "Projekti: ruutupohjaisen pelin ruudukkotyökalut. Kaikki menee yhteen Python-moduuliin, `gridtools.py`. Osat:\n\n1. **Paras polku ruudukon läpi.** Ruudukossa on kokonaislukuja (myös negatiivisia). Palauta suurin mahdollinen polun arvojen summa, kun liikutaan vasemmasta yläkulmas... | {
"kind": "code.plan.grid",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"grid_paths",
"count_islands"
],
"entries": [
"max_path_sum",
"num_islands"
],
"problem_ids": [
"88866def76ad",
"75d0defff9c7"
],
"difficulty": 2,
... |
codeplan-train-000012 | [
{
"role": "user",
"content": "Rakennan Pythonilla budjetointityökalun numeeriset apufunktiot, yhtenä moduulina `budget_math.py`. Siihen tarvitaan nämä osat:\n\n1. **Laske osataulukot.** Palauta, montako sellaista listan `nums` epätyhjää yhtenäistä osataulukkoa on, joiden summa on tasan `k`. Arvot voivat oll... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"subarray_count",
"lis",
"coin_change"
],
"entries": [
"count_sum_k",
"longest_run_up",
"min_coins"
],
"problem_ids": [
"30cbcb348f5f",
"53e0... |
codeplan-train-000013 | [
{
"role": "user",
"content": "Projekti: ruutupohjaisen pelin ruudukkotyökalut. Kaikki menee yhteen Python-moduuliin, `gridtools.py`. Osat:\n\n1. **Laske saaret.** Ruudukko on lista yhtä pitkiä merkkijonoja, joissa '1' on maata ja '0' vettä. Kaksi maaruutua kuuluu samaan saareen, kun ne ovat vierekkäin vaaka... | {
"kind": "code.plan.grid",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"count_islands",
"spiral",
"robot_walk"
],
"entries": [
"islands",
"spiral",
"robot_max_distance"
],
"problem_ids": [
"49595087decb",
"38f2502ba... |
codeplan-train-000014 | [
{
"role": "user",
"content": "Projekti: laskinpalvelun ydin. Kaikki menee yhteen Python-moduuliin, `calc_core.py`. Osat:\n\n1. **Laske alkuluvut välillä.** Palauta, kuinka monta alkulukua `p` toteuttaa ehdon `lo <= p <= hi`. `lo` voi olla negatiivinen, ja `lo > hi` tarkoittaa tyhjää väliä. `hi` voi olla jop... | {
"kind": "code.plan.calc",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"primes_range",
"expr_eval",
"subarray_count"
],
"entries": [
"count_primes",
"eval_expression",
"subarrays_div_by"
],
"problem_ids": [
"fcfb2ec4ac3a... |
codeplan-train-000015 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla pieni tekstinkäsittelykirjasto: yksi moduuli, `textkit.py`, jossa on seuraavat osat.\n\n1. **Pisin palindromiosajono.** Palauta merkkijonon `s` pisimmän sellaisen osajonon pituus, joka on sama takaperin luettuna. `s` voi olla tuhansia merkkejä pitkä, joten ... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"palindromes",
"edit_distance"
],
"entries": [
"longest_palindrome_len",
"edit_cost"
],
"problem_ids": [
"9faa9dcf328a",
"6ffdde278c0d"
],
"difficult... |
codeplan-train-000016 | [
{
"role": "user",
"content": "I'm building grid utilities for a tile-based game in Python, as one module `gridtools.py`. It needs these parts:\n\n1. **Paths through a grid.** 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 ... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"grid_paths",
"histogram",
"robot_walk"
],
"entries": [
"unique_paths",
"max_histogram_area",
"walk"
],
"problem_ids": [
"9cbaa94810d4",
"b594cfa... |
codeplan-train-000017 | [
{
"role": "user",
"content": "Rakennan Pythonilla pieni tekstinkäsittelykirjasto, yhtenä moduulina `textkit.py`. Siihen tarvitaan nämä osat:\n\n1. **Tasapainoiset sulkeet.** Palauta True, jos jokainen `(`, `[` ja `{` merkkijonossa `s` suljetaan oikealla sulkeella oikeassa järjestyksessä, muuten False. Muut ... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"brackets",
"palindromes",
"word_break"
],
"entries": [
"is_balanced",
"palindromic_substrings",
"can_segment"
],
"problem_ids": [
"9719044729f6",
... |
codeplan-train-000018 | [
{
"role": "user",
"content": "Project: number utilities for a budgeting tool. Everything goes in one Python module, `budget_math.py`. Parts:\n\n1. **Knapsack (unbounded).** Item i weighs `weights[i]` and is worth `values[i]` (all positive integers). Return the largest total value whose total weight is at mo... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"knapsack",
"subarray_count",
"lis"
],
"entries": [
"best_load",
"count_divisible",
"longest_increasing"
],
"problem_ids": [
"bbd681649271",
"... |
codeplan-train-000019 | [
{
"role": "user",
"content": "I'm building the in-memory layer of an API backend in Python, as one module `memlayer.py`. It needs these parts:\n\n1. **LRU cache.** Implement `LRUCache(capacity)` with `get(key)` (the value, or -1 if absent) and `put(key, value)`. Both count as a use of the key. When a put wo... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"lru_cache",
"time_map"
],
"entries": [
"LRUCache",
"TimeMap"
],
"problem_ids": [
"e9eeef7af2fc",
"a6e61ba9ba95"
],
"difficulty": 2,
"n_tests": ... |
codeplan-train-000020 | [
{
"role": "user",
"content": "I need a small text-processing library in Python: a single module, `textkit.py`, with the following parts.\n\n1. **Fewest words.** 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 imposs... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"word_break",
"brackets",
"rle"
],
"entries": [
"min_word_split",
"fix_parens",
"compress"
],
"problem_ids": [
"80e4a77aa7a1",
"f26917dfccd0",
... |
codeplan-train-000021 | [
{
"role": "user",
"content": "Projekti: API-taustapalvelun muistikerros. Kaikki menee yhteen Python-moduuliin, `memlayer.py`. Osat:\n\n1. **k yleisintä sanaa.** Palauta listan `words` `k` yleisintä sanaa yleisimmästä alkaen. Saman verran esiintyvät sanat järjestetään aakkosjärjestykseen. Jos erilaisia sanoj... | {
"kind": "code.plan.backend",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"top_k_words",
"prefix_counter",
"time_map"
],
"entries": [
"top_words",
"PrefixCounter",
"VersionedStore"
],
"problem_ids": [
"c1541db84646",
... |
codeplan-train-000022 | [
{
"role": "user",
"content": "I'm building grid utilities for a tile-based game in Python, as one module `gridtools.py`. It needs these parts:\n\n1. **Largest rectangle in a histogram.** `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... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"histogram",
"grid_paths"
],
"entries": [
"largest_rectangle",
"unique_paths"
],
"problem_ids": [
"b594cfa644b5",
"9cbaa94810d4"
],
"difficulty": 3,
... |
codeplan-train-000023 | [
{
"role": "user",
"content": "I'm building number utilities for a budgeting tool in Python, as one module `budget_math.py`. It needs these parts:\n\n1. **Coin combinations.** Given distinct positive coin values (unlimited supply of each) and an amount, return the number of different combinations that add up... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"coin_change",
"inversions",
"subarray_count"
],
"entries": [
"coin_combinations",
"count_big_inversions",
"subarrays_div_by"
],
"problem_ids": [
... |
codeplan-train-000024 | [
{
"role": "user",
"content": "Rakennan Pythonilla budjetointityökalun numeeriset apufunktiot, yhtenä moduulina `budget_math.py`. Siihen tarvitaan nämä osat:\n\n1. **Vähiten kolikoita.** Annettuna erisuuruiset positiiviset kolikkoarvot (jokaista rajattomasti) ja summa, palauta pienin määrä kolikoita, joiden ... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"coin_change",
"inversions",
"lis"
],
"entries": [
"fewest_coins",
"count_big_inversions",
"lis_length"
],
"problem_ids": [
"9d7f7ca67fff",
"e... |
codeplan-train-000025 | [
{
"role": "user",
"content": "Project: grid utilities for a tile-based game. Everything goes in one Python module, `gridtools.py`. Parts:\n\n1. **Spiral order.** Return all elements of the `rows × cols` matrix in spiral order, starting at the top-left corner and going counter-clockwise (down the left column... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"spiral",
"grid_paths"
],
"entries": [
"spiral_order",
"count_paths"
],
"problem_ids": [
"af4362bd16a8",
"9cbaa94810d4"
],
"difficulty": 2,
"n_test... |
codeplan-train-000026 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla pieni tekstinkäsittelykirjasto: yksi moduuli, `textkit.py`, jossa on seuraavat osat.\n\n1. **Pisin osajono ilman toistoja.** Palauta merkkijonon `s` pisimmän sellaisen osajonon pituus, jossa mikään merkki ei esiinny kahdesti. `s` voi olla satojatuhansia mer... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"longest_window",
"rle"
],
"entries": [
"longest_distinct_substring",
"rle_encode"
],
"problem_ids": [
"d083d59e642a",
"082a4c4820df"
],
"difficulty"... |
codeplan-train-000027 | [
{
"role": "user",
"content": "I'm building a scheduling toolkit for a booking app in Python, as one module `scheduling.py`. It needs these parts:\n\n1. **Task order.** 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 t... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"topo_order",
"search_answer",
"meeting_rooms"
],
"entries": [
"schedule",
"min_ship_capacity",
"peak_time"
],
"problem_ids": [
"723aad79cf87"... |
codeplan-train-000028 | [
{
"role": "user",
"content": "I'm building the core of a calculator service in Python, as one module `calc_core.py`. It needs these parts:\n\n1. **Count subarrays.** 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 li... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"subarray_count",
"primes_range"
],
"entries": [
"count_divisible",
"count_primes"
],
"problem_ids": [
"d4e675b31167",
"fcfb2ec4ac3a"
],
"difficulty"... |
codeplan-train-000029 | [
{
"role": "user",
"content": "I'm building the core of a calculator service in Python, as one module `calc_core.py`. It needs these parts:\n\n1. **Count subarrays.** 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 li... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"subarray_count",
"brackets"
],
"entries": [
"subarrays_div_by",
"is_balanced"
],
"problem_ids": [
"d4e675b31167",
"9719044729f6"
],
"difficulty": 2,... |
codeplan-train-000030 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla budjetointityökalun numeeriset apufunktiot: yksi moduuli, `budget_math.py`, jossa on seuraavat osat.\n\n1. **Pisin ei-vähenevä alijono.** Palauta listan `nums` pisimmän alijonon (ei välttämättä yhtenäinen) pituus, kun alijonon on oltava ei-vähenevä (yhtä su... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"lis",
"subarray_count",
"coin_change"
],
"entries": [
"longest_increasing",
"count_divisible",
"fewest_coins"
],
"problem_ids": [
"53e040dea565",... |
codeplan-train-000031 | [
{
"role": "user",
"content": "I need the core of a calculator service in Python: a single module, `calc_core.py`, with the following parts.\n\n1. **Count primes in a range.** Return how many prime numbers `p` satisfy `lo <= p <= hi`. `lo` can be negative and `lo > hi` means an empty range. `hi` can be up to... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"primes_range",
"brackets",
"subarray_count"
],
"entries": [
"primes_between",
"fix_parens",
"subarrays_with_sum"
],
"problem_ids": [
"fcfb2ec4ac3a",... |
codeplan-train-000032 | [
{
"role": "user",
"content": "Project: number utilities for a budgeting tool. Everything goes in one Python module, `budget_math.py`. Parts:\n\n1. **Count inversions.** Return the number of index pairs `i < j` with `a[i] > a[j]`. Values can be negative and the list can have 150,000 elements, so checking eve... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"inversions",
"stock_profit",
"primes_range"
],
"entries": [
"count_inversions",
"max_profit_with_fee",
"count_primes"
],
"problem_ids": [
"ee7e58... |
codeplan-train-000033 | [
{
"role": "user",
"content": "Projekti: ajanvaraussovelluksen aikataulutyökalut. Kaikki menee yhteen Python-moduuliin, `scheduling.py`. Osat:\n\n1. **Kokoushuoneiden vähimmäismäärä.** Jokainen kokous on `[start, end)`: se varaa huoneen hetkestä `start` hetkeen `end` asti, mutta ei hetkeä `end`. Palauta pien... | {
"kind": "code.plan.scheduling",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"meeting_rooms",
"merge_intervals",
"interval_greedy"
],
"entries": [
"rooms_needed",
"merge_intervals",
"max_non_overlapping"
],
"problem_ids": [
... |
codeplan-train-000034 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla ruutupohjaisen pelin ruudukkotyökalut: yksi moduuli, `gridtools.py`, jossa on seuraavat osat.\n\n1. **Spiraalijärjestys.** Palauta `rows × cols` -matriisin kaikki alkiot spiraalijärjestyksessä alkaen vasemmasta yläkulmasta ja kulkien myötäpäivään (ensin oik... | {
"kind": "code.plan.grid",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"spiral",
"histogram"
],
"entries": [
"spiral",
"max_histogram_area"
],
"problem_ids": [
"38f2502ba7af",
"88cfb8e3925e"
],
"difficulty": 3,
"n_test... |
codeplan-train-000035 | [
{
"role": "user",
"content": "I need the in-memory layer of an API backend in Python: a single module, `memlayer.py`, with the following parts.\n\n1. **Range sums with updates.** Implement `PointUpdateSums(nums)` with `update(index, value)`, which sets `nums[index] = value`, and `query(left, right)`, which ... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"range_sum",
"window_extreme",
"prefix_counter"
],
"entries": [
"PointUpdateSums",
"sliding_max",
"PrefixCounter"
],
"problem_ids": [
"b62ae47198... |
codeplan-train-000036 | [
{
"role": "user",
"content": "I need a small text-processing library in Python: a single module, `textkit.py`, with the following parts.\n\n1. **Weighted edit distance.** Turn string `a` into string `b`. Inserting a character costs 2, deleting one costs 2, and replacing one character with a different one co... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"edit_distance",
"palindromes"
],
"entries": [
"weighted_edit_distance",
"longest_palindromic_substring"
],
"problem_ids": [
"876c399c6c40",
"9faa9dcf328... |
codeplan-train-000037 | [
{
"role": "user",
"content": "I need a route-planning module for a delivery map in Python: a single module, `routing.py`, with the following parts.\n\n1. **Robot on a grid.** 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.... | {
"kind": "code.plan.routing",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"robot_walk",
"grid_paths",
"count_islands"
],
"entries": [
"robot_max_distance",
"best_path",
"num_islands"
],
"problem_ids": [
"ed0035dc3a92",
... |
codeplan-train-000038 | [
{
"role": "user",
"content": "I need the in-memory layer of an API backend in Python: a single module, `memlayer.py`, with the following parts.\n\n1. **Sliding window maximum.** Given a list `nums` and a window size `k` (1 <= k <= len(nums)), return the largest value in every window of `k` consecutive eleme... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"window_extreme",
"rate_limiter"
],
"entries": [
"window_maxima",
"SlidingWindowLimiter"
],
"problem_ids": [
"13c182deb92a",
"60e4efc3c05f"
],
"d... |
codeplan-train-000039 | [
{
"role": "user",
"content": "Projekti: ruutupohjaisen pelin ruudukkotyökalut. Kaikki menee yhteen Python-moduuliin, `gridtools.py`. Osat:\n\n1. **Robotti ruudukossa.** Robotti aloittaa pisteestä (0, 0) pohjoiseen päin. Komennot: `-2` kääntää 90° vasemmalle, `-1` kääntää 90° oikealle ja `k` (1-9) liikkuu k ... | {
"kind": "code.plan.grid",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"robot_walk",
"histogram",
"grid_paths"
],
"entries": [
"walk",
"max_square_area",
"count_paths"
],
"problem_ids": [
"ed0035dc3a92",
"cd7bb6afda... |
codeplan-train-000040 | [
{
"role": "user",
"content": "I need the core of a calculator service in Python: a single module, `calc_core.py`, with the following parts.\n\n1. **Count subarrays.** 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 hun... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"subarray_count",
"brackets",
"expr_eval"
],
"entries": [
"subarrays_with_sum",
"min_insertions",
"eval_expression"
],
"problem_ids": [
"30cbcb348f5f... |
codeplan-train-000041 | [
{
"role": "user",
"content": "Rakennan Pythonilla budjetointityökalun numeeriset apufunktiot, yhtenä moduulina `budget_math.py`. Siihen tarvitaan nämä osat:\n\n1. **Laske osataulukot.** Palauta, montako sellaista listan `nums` epätyhjää yhtenäistä osataulukkoa on, joiden summa on tasan `k`. Arvot voivat oll... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"subarray_count",
"primes_range"
],
"entries": [
"count_sum_k",
"primes_between"
],
"problem_ids": [
"30cbcb348f5f",
"fcfb2ec4ac3a"
],
"difficulty... |
codeplan-train-000042 | [
{
"role": "user",
"content": "Project: the in-memory layer of an API backend. Everything goes in one Python module, `memlayer.py`. Parts:\n\n1. **Sliding window maximum.** Given a list `nums` and a window size `k` (1 <= k <= len(nums)), return the largest value in every window of `k` consecutive elements, f... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"window_extreme",
"prefix_counter",
"rate_limiter"
],
"entries": [
"window_maxima",
"PrefixCounter",
"SlidingWindowLimiter"
],
"problem_ids": [
"1... |
codeplan-train-000043 | [
{
"role": "user",
"content": "Project: the core of a calculator service. Everything goes in one Python module, `calc_core.py`. Parts:\n\n1. **Evaluate an arithmetic expression.** The string contains non-negative integers, `+`, `-`, `*`, `/`, parentheses, spaces, and unary minus (as in `-3` or `-(2 + 1)`). E... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"expr_eval",
"subarray_count",
"brackets"
],
"entries": [
"evaluate",
"subarrays_div_by",
"valid_brackets"
],
"problem_ids": [
"ba1b3f285f18",
"... |
codeplan-train-000044 | [
{
"role": "user",
"content": "I need the core of a calculator service in Python: a single module, `calc_core.py`, with the following parts.\n\n1. **Count subarrays.** 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 hun... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"subarray_count",
"brackets",
"expr_eval"
],
"entries": [
"subarrays_with_sum",
"min_insertions",
"calc"
],
"problem_ids": [
"30cbcb348f5f",
"f26... |
codeplan-train-000045 | [
{
"role": "user",
"content": "Project: the core of a calculator service. Everything goes in one Python module, `calc_core.py`. Parts:\n\n1. **Count primes in a range.** Return how many prime numbers `p` satisfy `lo <= p <= hi`. `lo` can be negative and `lo > hi` means an empty range. `hi` can be up to 8,000... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"primes_range",
"subarray_count",
"brackets"
],
"entries": [
"count_primes",
"subarrays_with_sum",
"is_balanced"
],
"problem_ids": [
"fcfb2ec4ac3a",
... |
codeplan-train-000046 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla pieni tekstinkäsittelykirjasto: yksi moduuli, `textkit.py`, jossa on seuraavat osat.\n\n1. **Sanoiksi jakaminen.** Palauta True, jos `s` voidaan jakaa yhden tai useamman listan `words` sanan jonoksi (jokaista sanaa saa käyttää kuinka monesti tahansa), ja mu... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"word_break",
"longest_window",
"common_sequence"
],
"entries": [
"can_segment",
"longest_k_distinct",
"lcs_length"
],
"problem_ids": [
"b1a741a936bf... |
codeplan-train-000047 | [
{
"role": "user",
"content": "Rakennan Pythonilla toimituskartan reitinsuunnittelumoduuli, yhtenä moduulina `routing.py`. Siihen tarvitaan nämä osat:\n\n1. **Ensimmäinen sykliä sulkeva kaari.** Solmuja on `n`, numeroitu 0..n-1, ja suuntaamattomat kaaret annetaan listana `[u, v]`. Kaaret lisätään yksi kerral... | {
"kind": "code.plan.routing",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"union_find",
"robot_walk"
],
"entries": [
"first_redundant_edge",
"robot_max_distance"
],
"problem_ids": [
"68a840458140",
"ed0035dc3a92"
],
"di... |
codeplan-train-000048 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla pieni tekstinkäsittelykirjasto: yksi moduuli, `textkit.py`, jossa on seuraavat osat.\n\n1. **Jaksopituuskoodaus.** `s` sisältää vain pieniä kirjaimia. Korvaa jokainen samojen kirjainten jakso kirjaimella ja jakson pituudella (pituuden 1 jakso kirjoitetaan p... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"rle",
"common_sequence"
],
"entries": [
"rle_encode",
"common_substring_len"
],
"problem_ids": [
"29749195abb7",
"92f6b9711b3e"
],
"difficulty": 2,... |
codeplan-train-000049 | [
{
"role": "user",
"content": "Projekti: pieni tekstinkäsittelykirjasto. Kaikki menee yhteen Python-moduuliin, `textkit.py`. Osat:\n\n1. **Tasapainoiset sulkeet.** Palauta True, jos jokainen `(`, `[` ja `{` merkkijonossa `s` suljetaan oikealla sulkeella oikeassa järjestyksessä, muuten False. Muut merkit ohit... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"brackets",
"palindromes",
"longest_window"
],
"entries": [
"is_balanced",
"count_palindromes",
"longest_with_k_kinds"
],
"problem_ids": [
"97190447... |
codeplan-train-000050 | [
{
"role": "user",
"content": "I'm building a scheduling toolkit for a booking app in Python, as one module `scheduling.py`. It needs these parts:\n\n1. **Smallest ship capacity.** Packages with weights `weights` must be shipped in the given order within `days` days (1 <= days <= len(weights)). Each day the ... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"search_answer",
"meeting_rooms"
],
"entries": [
"smallest_capacity",
"min_meeting_rooms"
],
"problem_ids": [
"a38c7a51eb24",
"a177e8982e5d"
],
... |
codeplan-train-000051 | [
{
"role": "user",
"content": "Project: grid utilities for a tile-based game. Everything goes in one Python module, `gridtools.py`. Parts:\n\n1. **Count islands.** 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 oth... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"count_islands",
"grid_paths"
],
"entries": [
"islands",
"count_paths"
],
"problem_ids": [
"49595087decb",
"9cbaa94810d4"
],
"difficulty": 2,
"n_te... |
codeplan-train-000052 | [
{
"role": "user",
"content": "Project: the core of a calculator service. Everything goes in one Python module, `calc_core.py`. Parts:\n\n1. **Count subarrays.** 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 ca... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"subarray_count",
"expr_eval"
],
"entries": [
"count_divisible",
"eval_expression"
],
"problem_ids": [
"d4e675b31167",
"2918dd17ef27"
],
"difficulty"... |
codeplan-train-000053 | [
{
"role": "user",
"content": "Rakennan Pythonilla ruutupohjaisen pelin ruudukkotyökalut, yhtenä moduulina `gridtools.py`. Siihen tarvitaan nämä osat:\n\n1. **Spiraalijärjestys.** Palauta `rows × cols` -matriisin kaikki alkiot spiraalijärjestyksessä alkaen vasemmasta yläkulmasta ja kulkien vastapäivään (ensi... | {
"kind": "code.plan.grid",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"spiral",
"robot_walk",
"histogram"
],
"entries": [
"spiral_order",
"robot_max_distance",
"largest_square"
],
"problem_ids": [
"af4362bd16a8",
"... |
codeplan-train-000054 | [
{
"role": "user",
"content": "I need number utilities for a budgeting tool in Python: a single module, `budget_math.py`, with the following parts.\n\n1. **Longest increasing subsequence.** Return the length of the longest subsequence of `nums` (not necessarily contiguous) that is strictly increasing. `nums`... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"lis",
"primes_range",
"coin_change"
],
"entries": [
"lis_length",
"primes_between",
"min_coins"
],
"problem_ids": [
"a9b07ae35241",
"fcfb2ec... |
codeplan-train-000055 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla pieni tekstinkäsittelykirjasto: yksi moduuli, `textkit.py`, jossa on seuraavat osat.\n\n1. **Tasapainoiset sulkeet.** Palauta True, jos jokainen `(`, `[` ja `{` merkkijonossa `s` suljetaan oikealla sulkeella oikeassa järjestyksessä, muuten False. Muut merki... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"brackets",
"edit_distance"
],
"entries": [
"is_balanced",
"weighted_edit_distance"
],
"problem_ids": [
"9719044729f6",
"0aa57d421baa"
],
"difficulty... |
codeplan-train-000056 | [
{
"role": "user",
"content": "I'm building a route-planning module for a delivery map in Python, as one module `routing.py`. It needs these parts:\n\n1. **Paths through a grid.** The grid is a list of strings of '.' (open) and '#' (blocked). Starting at the top-left cell and moving only right or down, how m... | {
"kind": "code.plan.routing",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"grid_paths",
"dijkstra",
"count_islands"
],
"entries": [
"count_paths",
"all_distances",
"count_islands"
],
"problem_ids": [
"9cbaa94810d4",
... |
codeplan-train-000057 | [
{
"role": "user",
"content": "Rakennan Pythonilla budjetointityökalun numeeriset apufunktiot, yhtenä moduulina `budget_math.py`. Siihen tarvitaan nämä osat:\n\n1. **Laske alkuluvut välillä.** Palauta, kuinka monta alkulukua `p` toteuttaa ehdon `lo <= p <= hi`. `lo` voi olla negatiivinen, ja `lo > hi` tarkoi... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"primes_range",
"stock_profit"
],
"entries": [
"count_primes",
"trade_with_cooldown"
],
"problem_ids": [
"fcfb2ec4ac3a",
"15e492eafe74"
],
"diffi... |
codeplan-train-000058 | [
{
"role": "user",
"content": "I need grid utilities for a tile-based game in Python: a single module, `gridtools.py`, with the following parts.\n\n1. **Largest rectangle in a histogram.** `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 o... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"histogram",
"spiral",
"robot_walk"
],
"entries": [
"largest_rectangle",
"spiral_order",
"robot_max_distance"
],
"problem_ids": [
"88cfb8e3925e",
... |
codeplan-train-000059 | [
{
"role": "user",
"content": "I'm building grid utilities for a tile-based game in Python, as one module `gridtools.py`. It needs these parts:\n\n1. **Robot on a grid.** 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 t... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"robot_walk",
"histogram",
"count_islands"
],
"entries": [
"walk",
"largest_rectangle",
"islands"
],
"problem_ids": [
"ed0035dc3a92",
"b594cfa644... |
codeplan-train-000060 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla budjetointityökalun numeeriset apufunktiot: yksi moduuli, `budget_math.py`, jossa on seuraavat osat.\n\n1. **Osakekauppa välityspalkkiolla.** `prices[i]` on osakkeen hinta päivänä `i`. Saat tehdä kauppoja niin monta kuin haluat, mutta voit omistaa enintään ... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"stock_profit",
"knapsack"
],
"entries": [
"trade_with_fee",
"best_load"
],
"problem_ids": [
"7c21876f4e43",
"bbd681649271"
],
"difficulty": 3,
... |
codeplan-train-000061 | [
{
"role": "user",
"content": "I need a scheduling toolkit for a booking app in Python: a single module, `scheduling.py`, with the following parts.\n\n1. **Smallest ship capacity.** Packages with weights `weights` must be shipped in the given order within `days` days (1 <= days <= len(weights)). Each day the... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"search_answer",
"rate_limiter",
"meeting_rooms"
],
"entries": [
"min_ship_capacity",
"SlidingWindowLimiter",
"min_meeting_rooms"
],
"problem_ids":... |
codeplan-train-000062 | [
{
"role": "user",
"content": "I need the in-memory layer of an API backend in Python: a single module, `memlayer.py`, with the following parts.\n\n1. **Prefix counter.** Implement `PrefixCounter()` with three methods: `insert(word)` adds a word (duplicates count again), `count(word)` returns how many times ... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"prefix_counter",
"time_map"
],
"entries": [
"PrefixCounter",
"TimeMap"
],
"problem_ids": [
"f4007ef9f63c",
"a6e61ba9ba95"
],
"difficulty": 2,
... |
codeplan-train-000063 | [
{
"role": "user",
"content": "Project: a scheduling toolkit for a booking app. Everything goes in one Python module, `scheduling.py`. Parts:\n\n1. **Task order.** 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 d... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"topo_order",
"meeting_rooms",
"search_answer"
],
"entries": [
"schedule",
"min_meeting_rooms",
"min_ship_capacity"
],
"problem_ids": [
"723aa... |
codeplan-train-000064 | [
{
"role": "user",
"content": "Projekti: ajanvaraussovelluksen aikataulutyökalut. Kaikki menee yhteen Python-moduuliin, `scheduling.py`. Osat:\n\n1. **Tehtävien järjestys.** Tehtäviä on `n` (`0..n-1`) ja pareja `[a, b]`, jotka tarkoittavat, että tehtävä `a` on tehtävä ennen tehtävää `b`. Palauta leksikografi... | {
"kind": "code.plan.scheduling",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"topo_order",
"search_answer"
],
"entries": [
"smallest_topo_order",
"smallest_capacity"
],
"problem_ids": [
"723aad79cf87",
"a38c7a51eb24"
],
... |
codeplan-train-000065 | [
{
"role": "user",
"content": "I'm building number utilities for a budgeting tool in Python, as one module `budget_math.py`. It needs these parts:\n\n1. **Knapsack (0/1).** Item i weighs `weights[i]` and is worth `values[i]` (all positive integers). Return the largest total value whose total weight is at mos... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"knapsack",
"primes_range"
],
"entries": [
"knapsack",
"count_primes"
],
"problem_ids": [
"ad345a84d149",
"fcfb2ec4ac3a"
],
"difficulty": 2,
"n_... |
codeplan-train-000066 | [
{
"role": "user",
"content": "I'm building a small text-processing library in Python, as one module `textkit.py`. It needs these parts:\n\n1. **Longest common substring.** 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 ... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"common_sequence",
"brackets",
"palindromes"
],
"entries": [
"longest_common_substring",
"is_balanced",
"palindromic_substrings"
],
"problem_ids": [
... |
codeplan-train-000067 | [
{
"role": "user",
"content": "Rakennan Pythonilla toimituskartan reitinsuunnittelumoduuli, yhtenä moduulina `routing.py`. Siihen tarvitaan nämä osat:\n\n1. **Robotti ruudukossa.** Robotti aloittaa pisteestä (0, 0) pohjoiseen päin. Komennot: `-2` kääntää 90° vasemmalle, `-1` kääntää 90° oikealle ja `k` (1-9)... | {
"kind": "code.plan.routing",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"robot_walk",
"count_islands"
],
"entries": [
"walk",
"num_islands"
],
"problem_ids": [
"ed0035dc3a92",
"75d0defff9c7"
],
"difficulty": 2,
"n_te... |
codeplan-train-000068 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla budjetointityökalun numeeriset apufunktiot: yksi moduuli, `budget_math.py`, jossa on seuraavat osat.\n\n1. **Reppuongelma (0/1).** Esine i painaa `weights[i]` ja on arvoltaan `values[i]` (kaikki positiivisia kokonaislukuja). Palauta suurin kokonaisarvo, jon... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"knapsack",
"coin_change"
],
"entries": [
"knapsack",
"fewest_coins"
],
"problem_ids": [
"ad345a84d149",
"9d7f7ca67fff"
],
"difficulty": 2,
"n_t... |
codeplan-train-000069 | [
{
"role": "user",
"content": "Rakennan Pythonilla laskinpalvelun ydin, yhtenä moduulina `calc_core.py`. Siihen tarvitaan nämä osat:\n\n1. **Tasapainoiset sulkeet.** Palauta True, jos jokainen `(`, `[` ja `{` merkkijonossa `s` suljetaan oikealla sulkeella oikeassa järjestyksessä, muuten False. Muut merkit oh... | {
"kind": "code.plan.calc",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"brackets",
"expr_eval",
"primes_range"
],
"entries": [
"is_balanced",
"calc",
"primes_between"
],
"problem_ids": [
"9719044729f6",
"2918dd17ef27... |
codeplan-train-000070 | [
{
"role": "user",
"content": "Projekti: ajanvaraussovelluksen aikataulutyökalut. Kaikki menee yhteen Python-moduuliin, `scheduling.py`. Osat:\n\n1. **Kokoushuoneiden vähimmäismäärä.** Jokainen kokous on `[start, end)`: se varaa huoneen hetkestä `start` hetkeen `end` asti, mutta ei hetkeä `end`. Palauta pien... | {
"kind": "code.plan.scheduling",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"meeting_rooms",
"merge_intervals"
],
"entries": [
"rooms_needed",
"merge"
],
"problem_ids": [
"11d132d67532",
"e4808a056a07"
],
"difficulty": ... |
codeplan-train-000071 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla ruutupohjaisen pelin ruudukkotyökalut: yksi moduuli, `gridtools.py`, jossa on seuraavat osat.\n\n1. **Histogrammin suurin neliö.** `heights[i]` on histogrammin pylvään `i` korkeus; jokainen pylväs on 1 leveä, ja pylväät ovat vierekkäin. Palauta suurimman py... | {
"kind": "code.plan.grid",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"histogram",
"spiral",
"grid_paths"
],
"entries": [
"largest_square",
"spiral_order",
"max_path_sum"
],
"problem_ids": [
"d87fffcb5cc7",
"38f250... |
codeplan-train-000072 | [
{
"role": "user",
"content": "Projekti: pieni tekstinkäsittelykirjasto. Kaikki menee yhteen Python-moduuliin, `textkit.py`. Osat:\n\n1. **Pisin osajono ilman toistoja.** Palauta merkkijonon `s` pisimmän sellaisen osajonon pituus, jossa mikään merkki ei esiinny kahdesti. `s` voi olla satojatuhansia merkkejä ... | {
"kind": "code.plan.text",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"longest_window",
"top_k_words"
],
"entries": [
"longest_unique_run",
"top_k_words"
],
"problem_ids": [
"d083d59e642a",
"c1541db84646"
],
"difficulty... |
codeplan-train-000073 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla laskinpalvelun ydin: yksi moduuli, `calc_core.py`, jossa on seuraavat osat.\n\n1. **Korjaa sulkeet.** `s` sisältää vain merkkejä `(` ja `)`. Palauta pienin määrä sulkeita, jotka on lisättävä (mihin tahansa), jotta jono on tasapainoinen.\n2. **Laske aritmeet... | {
"kind": "code.plan.calc",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"brackets",
"expr_eval"
],
"entries": [
"min_insertions",
"eval_expression"
],
"problem_ids": [
"f26917dfccd0",
"ba1b3f285f18"
],
"difficulty": 3,
... |
codeplan-train-000074 | [
{
"role": "user",
"content": "I'm building grid utilities for a tile-based game in Python, as one module `gridtools.py`. It needs these parts:\n\n1. **Paths through a grid.** 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 ... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"grid_paths",
"robot_walk",
"count_islands"
],
"entries": [
"unique_paths",
"robot_max_distance",
"islands"
],
"problem_ids": [
"9cbaa94810d4",
... |
codeplan-train-000075 | [
{
"role": "user",
"content": "I'm building the in-memory layer of an API backend in Python, as one module `memlayer.py`. It needs these parts:\n\n1. **Sliding window maximum.** Given a list `nums` and a window size `k` (1 <= k <= len(nums)), return the largest value in every window of `k` consecutive elemen... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"window_extreme",
"top_k_words"
],
"entries": [
"sliding_max",
"top_k_words"
],
"problem_ids": [
"c24ff94f7394",
"6ee163e1699e"
],
"difficulty": ... |
codeplan-train-000076 | [
{
"role": "user",
"content": "Projekti: ajanvaraussovelluksen aikataulutyökalut. Kaikki menee yhteen Python-moduuliin, `scheduling.py`. Osat:\n\n1. **Liukuvan ikkunan rajoitin.** Toteuta `RateLimiter(limit, window)`, jossa on `allow(t)`. Kutsu hetkellä `t` sallitaan, jos ikkunassa `(t - window, t]` on ollut... | {
"kind": "code.plan.scheduling",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"rate_limiter",
"interval_greedy",
"topo_order"
],
"entries": [
"RateLimiter",
"max_non_overlapping",
"schedule"
],
"problem_ids": [
"60e4efc3c... |
codeplan-train-000077 | [
{
"role": "user",
"content": "Tarvitsen Pythonilla ajanvaraussovelluksen aikataulutyökalut: yksi moduuli, `scheduling.py`, jossa on seuraavat osat.\n\n1. **Tehtävien järjestys.** Tehtäviä on `n` (`0..n-1`) ja pareja `[a, b]`, jotka tarkoittavat, että tehtävä `a` on tehtävä ennen tehtävää `b`. Palauta leksik... | {
"kind": "code.plan.scheduling",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"topo_order",
"interval_greedy"
],
"entries": [
"schedule",
"min_removals"
],
"problem_ids": [
"723aad79cf87",
"80778b127a4e"
],
"difficulty": ... |
codeplan-train-000078 | [
{
"role": "user",
"content": "Project: a route-planning module for a delivery map. Everything goes in one Python module, `routing.py`. Parts:\n\n1. **Best path through a grid.** The grid holds integers (possibly negative). Starting at the top-left cell and moving only right or down to the bottom-right cell,... | {
"kind": "code.plan.routing",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"grid_paths",
"cheapest_path"
],
"entries": [
"max_path_sum",
"cheapest_route"
],
"problem_ids": [
"88866def76ad",
"79c7a7a69f63"
],
"difficulty":... |
codeplan-train-000079 | [
{
"role": "user",
"content": "Project: a scheduling toolkit for a booking app. Everything goes in one Python module, `scheduling.py`. Parts:\n\n1. **Sliding-window rate limiter.** Implement `SlidingWindowLimiter(limit, window)` with `allow(t)`. A call at time `t` is allowed if fewer than `limit` allowed cal... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"rate_limiter",
"topo_order"
],
"entries": [
"SlidingWindowLimiter",
"schedule"
],
"problem_ids": [
"60e4efc3c05f",
"723aad79cf87"
],
"difficul... |
codeplan-train-000080 | [
{
"role": "user",
"content": "Project: number utilities for a budgeting tool. Everything goes in one Python module, `budget_math.py`. Parts:\n\n1. **Coin combinations.** Given distinct positive coin values (unlimited supply of each) and an amount, return the number of different combinations that add up to t... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"coin_change",
"stock_profit",
"knapsack"
],
"entries": [
"count_ways",
"max_profit_with_fee",
"max_value"
],
"problem_ids": [
"c64d9948a145",
... |
codeplan-train-000081 | [
{
"role": "user",
"content": "Rakennan Pythonilla budjetointityökalun numeeriset apufunktiot, yhtenä moduulina `budget_math.py`. Siihen tarvitaan nämä osat:\n\n1. **Osakekauppa välityspalkkiolla.** `prices[i]` on osakkeen hinta päivänä `i`. Saat tehdä kauppoja niin monta kuin haluat, mutta voit omistaa enin... | {
"kind": "code.plan.numbers",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"stock_profit",
"knapsack"
],
"entries": [
"max_profit_with_fee",
"best_load"
],
"problem_ids": [
"7c21876f4e43",
"ad345a84d149"
],
"difficulty": ... |
codeplan-train-000082 | [
{
"role": "user",
"content": "I need number utilities for a budgeting tool in Python: a single module, `budget_math.py`, with the following parts.\n\n1. **Count subarrays.** Return how many non-empty contiguous subarrays of `nums` there are whose sum is exactly `k`. Values can be negative and the list can h... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"subarray_count",
"lis"
],
"entries": [
"subarrays_with_sum",
"longest_increasing"
],
"problem_ids": [
"30cbcb348f5f",
"a9b07ae35241"
],
"difficul... |
codeplan-train-000083 | [
{
"role": "user",
"content": "Project: a small text-processing library. Everything goes in one Python module, `textkit.py`. Parts:\n\n1. **Top k words.** Return the `k` most frequent words in `words`, most frequent first. Words with the same count are ordered alphabetically. If there are fewer than `k` dist... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"top_k_words",
"longest_window"
],
"entries": [
"most_frequent",
"longest_k_distinct"
],
"problem_ids": [
"6ee163e1699e",
"6c59d711db68"
],
"difficu... |
codeplan-train-000084 | [
{
"role": "user",
"content": "I'm building number utilities for a budgeting tool in Python, as one module `budget_math.py`. It needs these parts:\n\n1. **Longest increasing subsequence.** Return the length of the longest subsequence of `nums` (not necessarily contiguous) that is strictly increasing. `nums` ... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"lis",
"stock_profit"
],
"entries": [
"longest_increasing",
"max_profit_with_fee"
],
"problem_ids": [
"a9b07ae35241",
"7c21876f4e43"
],
"difficult... |
codeplan-train-000085 | [
{
"role": "user",
"content": "I'm building the core of a calculator service in Python, as one module `calc_core.py`. It needs these parts:\n\n1. **Balanced brackets.** Return True if every `(`, `[` and `{` in `s` is closed by the matching bracket in the right order, and False otherwise. Other characters are... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"brackets",
"subarray_count",
"expr_eval"
],
"entries": [
"valid_brackets",
"subarrays_with_sum",
"evaluate"
],
"problem_ids": [
"9719044729f6",
... |
codeplan-train-000086 | [
{
"role": "user",
"content": "I need a small text-processing library in Python: a single module, `textkit.py`, with the following parts.\n\n1. **Count palindromic substrings.** Return how many non-empty substrings of `s` (counted by position) read the same backwards. `s` can be several thousand characters l... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"palindromes",
"rle",
"top_k_words"
],
"entries": [
"count_palindromes",
"compress",
"top_k_words"
],
"problem_ids": [
"d8eb67dc967b",
"29749195a... |
codeplan-train-000087 | [
{
"role": "user",
"content": "Projekti: API-taustapalvelun muistikerros. Kaikki menee yhteen Python-moduuliin, `memlayer.py`. Osat:\n\n1. **Etuliitelaskuri.** Toteuta `PrefixCounter()`, jossa on kolme metodia: `insert(word)` lisää sanan (toistot lasketaan uudelleen), `count(word)` palauttaa, montako kertaa ... | {
"kind": "code.plan.backend",
"lang": "fi",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"prefix_counter",
"rate_limiter",
"lru_cache"
],
"entries": [
"PrefixCounter",
"RateLimiter",
"LRUCache"
],
"problem_ids": [
"f8b0e94bd962",
"... |
codeplan-train-000088 | [
{
"role": "user",
"content": "I'm building a route-planning module for a delivery map in Python, as one module `routing.py`. It needs these parts:\n\n1. **Count islands.** 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... | {
"kind": "code.plan.routing",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"count_islands",
"robot_walk"
],
"entries": [
"num_islands",
"walk"
],
"problem_ids": [
"f54b612097b5",
"ed0035dc3a92"
],
"difficulty": 2,
"n_t... |
codeplan-train-000089 | [
{
"role": "user",
"content": "I'm building the in-memory layer of an API backend in Python, as one module `memlayer.py`. It needs these parts:\n\n1. **Sliding-window rate limiter.** Implement `RateLimiter(limit, window)` with `allow(t)`. A call at time `t` is allowed if fewer than `limit` allowed calls happ... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"rate_limiter",
"range_sum",
"top_k_words"
],
"entries": [
"RateLimiter",
"RangeSum",
"top_words"
],
"problem_ids": [
"60e4efc3c05f",
"b62ae4... |
codeplan-train-000090 | [
{
"role": "user",
"content": "Project: a route-planning module for a delivery map. Everything goes in one Python module, `routing.py`. Parts:\n\n1. **Count connected groups.** 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 numb... | {
"kind": "code.plan.routing",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"union_find",
"dijkstra",
"robot_walk"
],
"entries": [
"count_components",
"all_distances",
"walk"
],
"problem_ids": [
"fe41ffaf1f42",
"22d669... |
codeplan-train-000091 | [
{
"role": "user",
"content": "I'm building the core of a calculator service in Python, as one module `calc_core.py`. It needs these parts:\n\n1. **Count primes in a range.** Return how many prime numbers `p` satisfy `lo <= p <= hi`. `lo` can be negative and `lo > hi` means an empty range. `hi` can be up to ... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"primes_range",
"brackets"
],
"entries": [
"primes_between",
"is_balanced"
],
"problem_ids": [
"fcfb2ec4ac3a",
"9719044729f6"
],
"difficulty": 1,
"... |
codeplan-train-000092 | [
{
"role": "user",
"content": "I need the core of a calculator service in Python: a single module, `calc_core.py`, with the following parts.\n\n1. **Evaluate an arithmetic expression.** The string contains non-negative integers, `+`, `-`, `*`, `/`, parentheses, spaces, and unary minus (as in `-3` or `-(2 + 1... | {
"kind": "code.plan.calc",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"expr_eval",
"brackets"
],
"entries": [
"evaluate",
"valid_brackets"
],
"problem_ids": [
"2918dd17ef27",
"9719044729f6"
],
"difficulty": 3,
"n_test... |
codeplan-train-000093 | [
{
"role": "user",
"content": "I'm building a small text-processing library in Python, as one module `textkit.py`. It needs these parts:\n\n1. **Count word splits.** Return the number of different ways to split `s` into words from `words` (each word can be used any number of times), modulo 1,000,000,007. The... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "both",
"parts": [
"word_break",
"longest_window",
"edit_distance"
],
"entries": [
"count_segmentations",
"longest_k_distinct",
"transform_cost"
],
"problem_ids": [
"66... |
codeplan-train-000094 | [
{
"role": "user",
"content": "Project: the in-memory layer of an API backend. Everything goes in one Python module, `memlayer.py`. Parts:\n\n1. **Sliding-window rate limiter.** Implement `RateLimiter(limit, window)` with `allow(t)`. A call at time `t` is allowed if fewer than `limit` allowed calls happened ... | {
"kind": "code.plan.backend",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"rate_limiter",
"lru_cache",
"top_k_words"
],
"entries": [
"RateLimiter",
"RecentCache",
"most_frequent"
],
"problem_ids": [
"60e4efc3c05f",
"... |
codeplan-train-000095 | [
{
"role": "user",
"content": "Project: a scheduling toolkit for a booking app. Everything goes in one Python module, `scheduling.py`. Parts:\n\n1. **Task order.** 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 d... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"topo_order",
"rate_limiter",
"merge_intervals"
],
"entries": [
"smallest_topo_order",
"SlidingWindowLimiter",
"merge"
],
"problem_ids": [
"72... |
codeplan-train-000096 | [
{
"role": "user",
"content": "I need number utilities for a budgeting tool in Python: a single module, `budget_math.py`, with the following parts.\n\n1. **Count big inversions.** 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, s... | {
"kind": "code.plan.numbers",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"inversions",
"subarray_count",
"stock_profit"
],
"entries": [
"reverse_pairs",
"count_sum_k",
"best_single_trade"
],
"problem_ids": [
"ee3155a925... |
codeplan-train-000097 | [
{
"role": "user",
"content": "Project: a scheduling toolkit for a booking app. Everything goes in one Python module, `scheduling.py`. Parts:\n\n1. **Merge overlapping intervals.** You are given a list of intervals `[start, end]` with `start < end`, in no particular order. Merge every group of intervals that... | {
"kind": "code.plan.scheduling",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "multi",
"parts": [
"merge_intervals",
"interval_greedy",
"rate_limiter"
],
"entries": [
"merge_intervals",
"fewest_stabs",
"RateLimiter"
],
"problem_ids": [
"279... |
codeplan-train-000098 | [
{
"role": "user",
"content": "Project: grid utilities for a tile-based game. Everything goes in one Python module, `gridtools.py`. Parts:\n\n1. **Largest square in a histogram.** `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 lar... | {
"kind": "code.plan.grid",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"histogram",
"spiral"
],
"entries": [
"largest_square",
"spiral_order"
],
"problem_ids": [
"cd7bb6afdaaa",
"af4362bd16a8"
],
"difficulty": 3,
"n_te... |
codeplan-train-000099 | [
{
"role": "user",
"content": "I need a small text-processing library in Python: a single module, `textkit.py`, with the following parts.\n\n1. **Longest palindromic substring.** Return the length of the longest substring of `s` that reads the same backwards. `s` can be several thousand characters long, so c... | {
"kind": "code.plan.text",
"lang": "en",
"generator": "kreatix-code-plan",
"version": "0.1.0",
"mode": "plan",
"parts": [
"palindromes",
"rle",
"longest_window"
],
"entries": [
"longest_palindrome_len",
"rle_encode",
"longest_with_k_kinds"
],
"problem_ids": [
"9faa9dcf32... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.